-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 1.2 KB
/
integration.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: continuous integration
on:
workflow_dispatch:
pull_request:
branches: [main]
jobs:
integration:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
ConnectionStrings__PersonnelsDbContext: Host=postgres;Port=5432;Database=postgres;User ID=postgres;Password=postgres;Timeout=120
container: mcr.microsoft.com/dotnet/sdk:7.0
steps:
- name: Checkout source files
uses: actions/checkout@v3
- name: Install EF core tools
run: dotnet tool install --global dotnet-ef
- name: Apply database migration
run : /github/home/.dotnet/tools/dotnet-ef database update --project src/Gsri.Api.Personnels
- name: Running unit tests
run: dotnet test src
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: src/Gsri.Api.Personnels.Tests/coverage.cobertura.xml