-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (63 loc) · 2.49 KB
/
push-actions.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
name: Tracer Testing
on: [push]
jobs:
list-instrumentations:
name: List supported instrumentations
runs-on: ubuntu-latest
outputs:
integration-tests: ${{ steps.discover_itests.outputs.integration_tests }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
architecture: x64
- name: Install jq
run:
sudo apt-get update && sudo apt-get install -y jq
- name: Install Python dependencies
run: |
pip install -r requirements.txt
- name: Generate list of integration tests
id: discover_itests
run: |
# Use the `list_integration_tests_ci` nox task to list all the integration tests families.
# The task outputs the list of tasks on stdout, each entry separated by a `\n` character.
# The task output is piped into the `jq` command, that formats it as a JSON list, as the
# we need a JSON datastructure later on for dynamic matrixes.
echo "integration_tests=$(python -m nox -e list_integration_tests_ci | jq -Rnc '[inputs]')" >> $GITHUB_OUTPUT
version-testing:
needs: [list-instrumentations]
runs-on: ubuntu-latest
strategy:
fail-fast: false # Prevent a single failure in the matrix from stopping all other jobs
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
integration-test-family: ${{ fromJson(needs.list-instrumentations.outputs.integration-tests) }}
name: ${{ matrix.python-version }} ${{ matrix.integration-test-family }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- run: pip3 install -r requirements.txt
- run: python3 -m nox -e "${{ matrix.integration-test-family }}"
component-testing:
runs-on: ubuntu-latest
strategy:
fail-fast: false # Prevent a single failure in the matrix from stopping all other jobs
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
name: Component Test for Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- run: pip3 install -r requirements.txt
- run: python3 -m nox -e "component_tests"