persistence/.gitea/workflows/test.yaml
Оля Бизюкова a57a6ea4f7
Some checks failed
PostgreSQL Service Example / runner-job (push) Failing after 3s
Unit tests / test (push) Failing after 1m0s
Правка
2024-12-17 14:48:35 +05:00

43 lines
1.3 KiB
YAML

name: Unit tests
run-name: ${{ gitea.actor }} is testing
on: push
jobs:
test:
runs-on: ubuntu-latest
# Service containers to run with `runner-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5442:5432
steps:
- name: Setup dotnet
if: ${{ steps.cache-dotnet.outputs.cache-hit != 'true' }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Check out repository code
uses: actions/checkout@v4
- name: Run integration tests
run: dotnet test DD.Persistence.IntegrationTests
env:
# The hostname used to communicate with the PostgreSQL service container
POSTGRES_HOST: postgres
# The default PostgreSQL port
POSTGRES_PORT: 5442