Skip to content

Commit

Permalink
test in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
teraa committed Jul 30, 2024
1 parent 93f5efc commit 997c351
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ jobs:
name: Deploy
runs-on: ubuntu-latest

services:
postgres:
image: docker.io/postgres:16
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -33,7 +46,12 @@ jobs:
- name: Restore dependencies
run: dotnet restore -r linux-x64

- name: Build
- name: Test
run: dotnet test --no-restore -c Release -r linux-x64 -v minimal --logger "console;verbosity=detailed"
env:
Db__ConnectionString: "Host=localhost;Port=5432;Database=trace_test;Username=postgres;Password=postgres;Include Error Detail=true;Command Timeout=60"

- name: Publish
run: >
dotnet publish BattleTrace
--no-restore -c Release -r linux-x64 --self-contained false -o bin/publish/
Expand All @@ -59,4 +77,6 @@ jobs:
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: true
TERM: xterm
user: ${{ vars.user }}

0 comments on commit 997c351

Please sign in to comment.