-
Notifications
You must be signed in to change notification settings - Fork 9
41 lines (33 loc) · 1.03 KB
/
push.yml
File metadata and controls
41 lines (33 loc) · 1.03 KB
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
name: On Push
on:
push
jobs:
push-develop:
name: Build, Test & Analyse
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
uses: ./.github/workflows/build-test-analyse.yml
secrets: inherit
build:
name: Build & Test
if: github.ref != format('refs/heads/{0}', github.event.repository.default_branch)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.nuget/packages
!~/.nuget/packages/unwanted
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
- name: Install dependencies
run: dotnet restore --locked-mode
- name: Build
run: dotnet build -c Release --no-restore
- name: Test
run: dotnet test -c Release --no-restore