generated from ghga-de/microservice-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.48 KB
/
run_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
48
49
50
51
name: Run tests on non main branch
on:
push:
branches-ignore:
- main
env:
IFRS_CONFIG_YAML: ./services/ifrs/dev_config.yaml
IRS_CONFIG_YAML: ./services/irs/dev_config.yaml
PCS_CONFIG_YAML: ./services/pcs/dev_config.yaml
UCS_CONFIG_YAML: ./services/ucs/dev_config.yaml
DCS_CONFIG_YAML: ./services/dcs/dev_config.yaml
EKSS_CONFIG_YAML: ./services/ekss/dev_config.yaml
jobs:
get-changed-services:
uses: ./.github/workflows/get_affected_services.yaml
test:
needs: get-changed-services
if: ${{ needs.get-changed-services.outputs.services != '' }}
runs-on: ubuntu-latest
strategy:
matrix:
service: ${{ fromJson(needs.get-changed-services.outputs.services) }}
fail-fast: false
steps:
- name: Checkout ${{matrix.service}}
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Python 3.12
id: setup-python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Update pip and pyopenssl
id: pip-update
run: python -m pip install --upgrade pip && pip install --upgrade pyopenssl
- name: Install global and local dependencies for ${{matrix.service}}
id: install-dependencies
run: pip install --no-deps -r ./lock/requirements-dev.txt && pip install --no-deps ./services/${{matrix.service}}
- name: Run tests for ${{matrix.service}}
id: run-tests
run: pytest ./services/${{matrix.service}}