Debian Codegraph @

.github/workflows/ci-tests.yml

raw
1 name: Continuous integration tests
2
3 on:
4 push:
5 branches: [ main ]
6 pull_request:
7 branches: [ main ]
8
9 concurrency:
10 group: build-${{ github.event.pull_request.number || github.ref }}
11 cancel-in-progress: true
12
13 jobs:
14
15 tox:
16 name: CI tests via Tox
17
18 runs-on: ubuntu-latest
19
20 strategy:
21 fail-fast: false
22 matrix:
23 # The README.rst file mentions the versions tested, please update it as well
24 py-ver-major: [3]
25 py-ver-minor: [10, 11, 12, 13, 14]
26 step: [lint, unit, mypy, bandit]
27
28 env:
29 py-semver: ${{ format('{0}.{1}', matrix.py-ver-major, matrix.py-ver-minor) }}
30 TOXENV: ${{ format('py{0}{1}-{2}', matrix.py-ver-major, matrix.py-ver-minor, matrix.step) }}
31
32 steps:
33 - uses: actions/checkout@v6
34 with:
35 fetch-depth: 0
36
37 - name: Set up Python
38 uses: actions/setup-python@v6
39 with:
40 python-version: ${{ env.py-semver }}
41 allow-prereleases: true
42 cache: pip
43 cache-dependency-path: |
44 requirements.txt
45 test-requirements.txt
46 mypy-requirements.txt
47
48 - name: Upgrade setuptools and install tox
49 run: |
50 pip install -U pip setuptools wheel
51 pip install "tox>4,<5" "tox-gh-actions>3"
52
53 - name: install dev libraries
54 run: sudo apt-get install -y libxml2-dev libxslt-dev
55
56 - name: MyPy cache
57 if: ${{ matrix.step == 'mypy' }}
58 uses: actions/cache@v5
59 with:
60 path: .mypy_cache/${{ env.py-semver }}
61 key: mypy-${{ env.py-semver }}
62
63 - name: Test with tox
64 run: tox
65
66 - name: Upload coverage to Codecov
67 if: ${{ matrix.step == 'unit' }}
68 uses: codecov/codecov-action@v5
69 with:
70 fail_ci_if_error: true
71 token: ${{ secrets.CODECOV_TOKEN }}
72
73 tox-style:
74 name: CI linters via Tox
75
76 runs-on: ubuntu-24.04
77
78 strategy:
79 matrix:
80 step: [lintreadme, pydocstyle]
81
82 env:
83 py-semver: "3.13"
84 TOXENV: ${{ format('py313-{0}', matrix.step) }}
85
86 steps:
87 - uses: actions/checkout@v6
88 with:
89 fetch-depth: 0
90
91 - name: Set up Python
92 uses: actions/setup-python@v6
93 with:
94 python-version: ${{ env.py-semver }}
95 cache: pip
96 cache-dependency-path: |
97 requirements.txt
98 test-requirements.txt
99 mypy-requirements.txt
100
101 - name: Upgrade setuptools and install tox
102 run: |
103 pip install -U pip setuptools wheel
104 pip install "tox>4,<5" "tox-gh-actions>3"
105
106 - if: ${{ matrix.step == 'pydocstyle' && github.event_name == 'pull_request'}}
107 name: Create local branch for diff-quality for PRs
108 run: git branch ${{github.base_ref}} origin/${{github.base_ref}}
109
110 - name: Test with tox
111 run: tox
112
113 release_test:
114 name: cwltest release test
115
116 runs-on: ubuntu-24.04
117
118 steps:
119 - uses: actions/checkout@v6
120
121 - name: Set up Python
122 uses: actions/setup-python@v6
123 with:
124 python-version: "3.13"
125 cache: pip
126 cache-dependency-path: |
127 requirements.txt
128 test-requirements.txt
129 mypy-requirements.txt
130
131 - name: Install packages
132 run: |
133 pip install -U pip setuptools wheel
134 pip install virtualenv
135
136 - name: Release test
137 env:
138 RELEASE_SKIP: head
139 run: ./release-test.sh