generated from ghga-de/microservice-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (38 loc) · 1.22 KB
/
monorepo_tests.yaml
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
name: Monorepo Tests
on: push
env:
IFRS_CONFIG_YAML: ./services/ifrs/.dev/.dev_config.yaml
IRS_CONFIG_YAML: ./services/irs/.dev/.dev_config.yaml
PCS_CONFIG_YAML: ./services/pcs/.dev/.dev_config.yaml
jobs:
check-changes:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.affected }}
steps:
- uses: actions/checkout@v3
- id: install-typer
run: pip install typer>=0.9.0
- id: set-matrix
run: |
echo "affected=$(python3 ./scripts/affected_services.py)" >> $GITHUB_OUTPUT
test:
needs: check-changes
runs-on: ubuntu-latest
strategy:
matrix:
service: ${{ fromJson(needs.check-changes.outputs.matrix) }}
steps:
- uses: actions/checkout@v3
with:
sparse-checkout: |
.github
.lock
.services/${{matrix.service}}
fetch-depth: 2
- name: update pip
run: python -m pip install --upgrade pip
- name: install dependencies
run: pip install --no-deps -r ./lock/requirements-dev.txt && pip install --no-deps -e ./services/${{matrix.service}}
- name: run tests for specific service
run: pytest ./services/${{matrix.service}}