-
Notifications
You must be signed in to change notification settings - Fork 1.6k
43 lines (35 loc) · 1.08 KB
/
ci.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
name: Build and Test Solutions
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
unit: ['unit-0', 'unit-1']
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: './global.json'
- name: Set Project Path
id: set-path
run: |
if [ "${{ matrix.unit }}" == "unit-0" ]; then
echo "project_path=${{ matrix.unit }}/completed/AkkaWordCounter" >> $GITHUB_OUTPUT
else
echo "project_path=${{ matrix.unit }}/completed" >> $GITHUB_OUTPUT
fi
- name: Restore dependencies
working-directory: ${{ steps.set-path.outputs.project_path }}
run: dotnet restore
- name: Build
working-directory: ${{ steps.set-path.outputs.project_path }}
run: dotnet build -c Release --no-restore
- name: Test
working-directory: ${{ steps.set-path.outputs.project_path }}
run: dotnet test -c Release --no-build