-
Notifications
You must be signed in to change notification settings - Fork 12
81 lines (68 loc) · 2.17 KB
/
Copy pathtests-collectors.yml
File metadata and controls
81 lines (68 loc) · 2.17 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
name: Tests Collectors
on:
push:
branches:
- main
pull_request:
concurrency:
group: tests-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
detect-test-files:
name: Detect test files
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
has_tests: ${{ steps.set-matrix.outputs.has_tests }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: set-matrix
name: Build test matrix
env:
GITHUB_REF_NAME: ${{ github.ref_name }}
RELEASE_REF: main
run: python .github/scripts/build_test_matrix.py
test:
name: Test ${{ matrix.name }}
needs: detect-test-files
if: needs.detect-test-files.outputs.has_tests == 'true'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.detect-test-files.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Clone pyoaev (satisfies Poetry path dependency)
working-directory: ..
run: git clone -b main https://github.com/OpenAEV-Platform/client-python
- name: Install Poetry
run: pip install poetry==2.1.3
- name: Run tests via run_test.sh
env:
GITHUB_REF_NAME: ${{ github.ref_name }}
RELEASE_REF: main
run: bash run_test.sh ${{ matrix.collector }}
- name: Upload coverage to Codecov
if: ${{ !cancelled() && hashFiles(format('{0}/coverage.xml', matrix.collector)) != '' }}
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
root_dir: ${{ github.workspace }}
fail_ci_if_error: false
flags: ${{ matrix.collector }}
verbose: true
- name: Upload test results to Codecov
if: ${{ !cancelled() && hashFiles(format('{0}/junit.xml', matrix.collector)) != '' }}
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
report_type: test_results