2024-12-19 09:12:39 +05:00
|
|
|
name: Unit tests
|
|
|
|
run-name: ${{ gitea.actor }} is testing
|
|
|
|
on: push
|
2024-12-17 14:05:14 +05:00
|
|
|
|
|
|
|
jobs:
|
2024-12-19 09:12:39 +05:00
|
|
|
test:
|
2024-12-17 14:05:14 +05:00
|
|
|
runs-on: ubuntu-latest
|
2024-12-19 09:12:39 +05:00
|
|
|
|
|
|
|
# Service containers to run with `runner-job`
|
|
|
|
services:
|
|
|
|
# Label used to access the service container
|
|
|
|
postgres_test_12345678987654321_qqq_www:
|
|
|
|
# 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
|
|
|
|
|
2024-12-17 14:05:14 +05:00
|
|
|
steps:
|
2024-12-19 09:30:05 +05:00
|
|
|
# - name: Setup dotnet
|
|
|
|
# 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
|
|
|
|
- name: Configure postgres
|
|
|
|
run: |
|
|
|
|
sudo -u postgres -s psql -U postgres -d postgres -c "alter user postgres with password 'postgres'; SELECT version();"
|
|
|
|
sudo locale -a
|