BirdsiteLive/.github/workflows/dotnet-core.yml

29 lines
821 B
YAML
Raw Normal View History

2020-07-07 08:16:22 +02:00
name: ASP.NET Core Build & Tests
2020-06-29 05:47:28 +02:00
2020-07-07 08:16:22 +02:00
on: [push, pull_request]
2020-06-29 05:47:28 +02:00
jobs:
build:
runs-on: ubuntu-latest
2020-06-29 05:50:50 +02:00
env:
working-directory: ./src
2020-06-29 05:47:28 +02:00
steps:
- uses: actions/checkout@v2
2020-07-06 02:30:26 +02:00
- name: Launch Db for testing
run: docker run --name postgres -e POSTGRES_DB=mytestdb -e POSTGRES_PASSWORD=mysecretpassword -d -p 5432:5432 postgres
2020-06-29 05:47:28 +02:00
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
2023-01-06 08:34:22 +01:00
dotnet-version: 6.0.x
2020-06-29 05:47:28 +02:00
- name: Install dependencies
run: dotnet restore
2020-06-29 05:52:59 +02:00
working-directory: ${{env.working-directory}}
2020-06-29 05:47:28 +02:00
- name: Build
run: dotnet build --configuration Release --no-restore
2020-06-29 05:52:59 +02:00
working-directory: ${{env.working-directory}}
2020-06-29 05:47:28 +02:00
- name: Test
2021-02-14 18:19:31 +01:00
run: dotnet test --no-restore --verbosity minimal
2020-06-29 05:52:59 +02:00
working-directory: ${{env.working-directory}}