-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (59 loc) · 1.7 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
on:
push:
branches:
- master
jobs:
python-unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set Up Python
uses: actions/setup-python@v4
- name: Run Python Unit Tests
run: |
make python_tests
changed-files:
runs-on: ubuntu-latest
needs:
- python-unit-tests
outputs:
files_matrix: ${{ steps.print-changed-files.outputs.files_matrix }}
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set Up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Run Python Unit Tests
run: |
make python_tests
- name: Get Changed Files
id: changed-files
uses: tj-actions/changed-files@v45
- name: Print Changed Files
id: print-changed-files
run: |
make get_changed_files changed_files="${{ steps.changed-files.outputs.all_changed_files }}"
run-service-unit-tests:
if: ${{ needs.changed-files.outputs.files_matrix != '[]' }}s
runs-on: ubuntu-latest
strategy:
matrix:
service_name: ${{ fromJson(needs.changed-files.outputs.files_matrix) }}
needs:
- changed-files
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore Dependencies, Build and Test
run: |
cd ${{ matrix.service_name }}/${{ matrix.service_name }}.UnitTests
dotnet restore
dotnet build --no-restore
dotnet test --no-build --verbosity normal