тест вроде готов
Tests / test (pull_request) Successful in 1m51s

This commit is contained in:
gorbenko.pavel
2026-07-23 15:26:06 +05:00
parent 436c8ce7d4
commit 9b27f328a7
4 changed files with 90 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
name: Tests
on:
push:
branches:
- main
- master
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: tnsu_approval_route
POSTGRES_USER: tnsu_approval_route
POSTGRES_PASSWORD: tnsu_approval_route
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U tnsu_approval_route -d tnsu_approval_route"
--health-interval 5s
--health-timeout 3s
--health-retries 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Restore
run: dotnet restore backend/Tnsu.ApprovalRoute.sln
- name: Build
run: dotnet build backend/Tnsu.ApprovalRoute.sln --no-restore -c Release
- name: Test
env:
TEST_POSTGRES_CONNECTION: "Host=localhost;Port=5432;Database=tnsu_approval_route;Username=tnsu_approval_route;Password=tnsu_approval_route"
run: dotnet test backend/Tnsu.ApprovalRoute.sln --no-build -c Release