Repository navigation
51 lines (45 loc) · 1.63 KB
/
Copy pathtest.yml
File metadata and controls
51 lines (45 loc) · 1.63 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
name: Tests ✅
on:
push:
branches: [main]
pull_request:
jobs:
test:
name: Run tests (Python ${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.10', '3.11', '3.12']
include:
# Python 3.8/3.9 are not available in the ubuntu-latest (24.04)
# toolcache, so they run on ubuntu-22.04 instead.
- os: ubuntu-22.04
python-version: '3.8'
- os: ubuntu-22.04
python-version: '3.9'
- os: windows-latest
python-version: '3.12'
- os: macos-latest
python-version: '3.12'
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
# The test suite imports codesafe from the repository root, so the
# package itself does not need to be built; only its runtime
# dependencies are required.
run: |
python -m pip install --upgrade pip
python -m pip install "cryptography>=41"
- name: Run test suite
# Plain `python -m unittest` in every shell: the previous version piped
# through tee with POSIX syntax, which the Windows runners execute with
# PowerShell, so the Windows job failed on the shell rather than on a
# test. Runners print full output on failure, so no log scraping is
# needed here.
run: python run_ci_tests.py