-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (42 loc) · 1.11 KB
/
unit-tests.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
---
name: Unit-Tests
on:
workflow_call:
secrets:
CC_TEST_REPORTER_ID:
required: true
jobs:
unit-tests:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false # Allows for matrix sub-jobs to fail without cancelling the rest
matrix:
platform: [ubuntu-latest, windows-latest]
python-version: ["3.9", "3.13"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup poetry
id: poetry_setup
uses: ItsDrike/setup-poetry@v1
with:
python-version: ${{ matrix.python-version }}
install-args: "--without lint --without release"
- name: Run pytest
shell: bash
run: |
poetry run task test
tests-done:
needs: [unit-tests]
if: always() && !cancelled()
runs-on: ubuntu-latest
steps:
- name: Set status based on required jobs
env:
RESULTS: ${{ join(needs.*.result, ' ') }}
run: |
for result in $RESULTS; do
if [ "$result" != "success" ]; then
exit 1
fi
done