-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (42 loc) · 1.03 KB
/
blogapi-workflow.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
40
41
42
43
44
45
46
47
48
name: BlogAPI
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
on:
push:
paths:
- 'src/**'
- 'tests/**'
- 'BlogApp.sln'
- 'Directory.Build.props'
- '**/blogapi-workflow.yml'
pull_request:
paths:
- 'src/**'
- 'tests/**'
- 'BlogApp.sln'
- 'Directory.Build.props'
- '**/blogapi-workflow.yml'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Start dependencies (docker-compose)
run: |
docker-compose up -d
- name: Wait for SQL Server container
uses: jakejarvis/wait-action@master
with:
time: '5s'
- name: Install .NET Core SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- name: Restore NuGet packages
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore
- name: Test
run: dotnet test -c Release --no-build