-
Notifications
You must be signed in to change notification settings - Fork 7
55 lines (51 loc) · 1.54 KB
/
test.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
name: CI/CD
on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
# Create strategy matrix with a python script
create_matrix:
name: Create matrix
runs-on: ubuntu-latest
outputs:
matrix-json: ${{ steps.matrix.outputs.matrix }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Update pip
run: python -m pip install --upgrade pip
- name: Install wheel
run: pip install wheel
- name: Install requirements
run: pip install -r ./.github/scripts/requirements.txt
- name: Create matrix
id: matrix
run: python ./.github/scripts/create_python_matrix.py false
# Test the action with all possible combinations of python versions and os
test_action:
needs: create_matrix
runs-on: ${{ matrix.os }}
name: Test setup Python ${{ matrix.python-version }} for ${{ matrix.os }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.create_matrix.outputs.matrix-json) }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Python ${{ matrix.python-version }}
uses: ./
with:
python-version: ${{ matrix.python-version }}
allow-build: info
- name: Check Python version
run: python ./.github/scripts/check_python_version.py ${{ matrix.python-version }}