Skip to content

Merge pull request #384 from SapiensAnatis/develop #1004

Merge pull request #384 from SapiensAnatis/develop

Merge pull request #384 from SapiensAnatis/develop #1004

Workflow file for this run

name: test
on:
pull_request:
push:
branches:
- master
- develop
env:
HUSKY: 0
POSTGRES_USER: testing
POSTGRES_PASSWORD: verystrongpassword
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
project:
[
"DragaliaAPI.Test",
"DragaliaAPI.Integration.Test",
"DragaliaAPI.Database.Test",
"DragaliaAPI.Shared.Test",
"DragaliaAPI.Photon.StateManager.Test",
]
services:
postgres:
image: postgres
ports:
- "5432:5432"
env:
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis/redis-stack
ports:
- "6379:6379"
options: >-
--health-cmd "redis-cli PING"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core SDK 7
uses: actions/setup-dotnet@v3
with:
dotnet-version: "7.0.x"
- name: Install dependencies
run: dotnet restore ${{ matrix.project }}
- name: Test
run: >
dotnet test ${{ matrix.project }}
--no-restore
--logger "console;verbosity=detailed"
--logger "trx;LogFileName=${{ matrix.project }}.trx"
- name: Upload test report
uses: actions/upload-artifact@v3
if: success() || failure() # run this step even if previous step failed
with:
name: test-results
path: ${{ matrix.project }}/TestResults/${{ matrix.project }}.trx