-
Notifications
You must be signed in to change notification settings - Fork 12
39 lines (39 loc) · 1.2 KB
/
build.yml
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
name: Build
on:
workflow_call:
pull_request:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:5.0.10
options: >-
--health-cmd "echo 'db.runCommand("ping").ok' | mongo --host localhost --quiet --eval 'db.version()'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 27017:27017
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v2
with:
dotnet-version: '2.2.x' # SDK Version to use.
env:
MONGO_ADDRESS: localhost
- name: build
run: |
dotnet build src/Horarium.sln -c Release
- name: run unit tests
run: |
dotnet test src/Horarium.Test/Horarium.Test.csproj -c Release --no-restore
- name: run MongoDB integration tests
run: |
DataBase=MongoDB dotnet test src/Horarium.IntegrationTest/Horarium.IntegrationTest.csproj -c Release --no-restore
- name: run InMemory integration tests
run: |
DataBase=Memory dotnet test src/Horarium.IntegrationTest/Horarium.IntegrationTest.csproj -c Release --no-restore