-
Notifications
You must be signed in to change notification settings - Fork 11
58 lines (50 loc) · 1.51 KB
/
ci.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
name: Lint & test
on:
push:
branches: [main]
pull_request:
permissions: {}
jobs:
test:
permissions:
contents: read
strategy:
fail-fast: false
matrix:
toxenv: [lint-signer, test-signer]
pyversion: ['3.9', '3.12']
os: [ubuntu-latest, macos-latest]
# Only run repository on 3.12 (dependency pinning is easier with single version)
include:
- toxenv: lint-repo
pyversion: '3.12'
os: ubuntu-latest
- toxenv: test-repo
pyversion: '3.12'
os: ubuntu-latest
- toxenv: test-e2e
pyversion: '3.12'
os: ubuntu-latest
runs-on: ${{ matrix.os }}
env:
TOXENV: ${{ matrix.toxenv }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: ${{ matrix.pyversion }}
cache: 'pip'
cache-dependency-path: |
signer/pyproject.toml
repo/pyproject.toml
action-constraints.txt
build/build-constraints.txt
- name: Install system dependencies for e2e test
if: matrix.toxenv == 'test-e2e'
run: |
sudo apt-get install libfaketime softhsm2
echo "PYKCS11LIB=/usr/lib/softhsm/libsofthsm2.so" >> $GITHUB_ENV
- name: Install tox
run: python -m pip install -c build/build-constraints.txt tox
- name: ${{ matrix.toxenv }}
run: tox