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:
dotnet-version: 3.1.101
- 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
2020-07-06 07:15:24 +02:00
run: dotnet test --no-restore --verbosity quiet
2020-06-29 05:52:59 +02:00
working-directory: ${{env.working-directory}}