-
Notifications
You must be signed in to change notification settings - Fork 3
40 lines (37 loc) · 1.27 KB
/
ci.yaml
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
---
name: Tests
on: [push, pull_request]
jobs:
pytest:
name: Python ${{ matrix.python }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ubuntu, windows, macos]
python: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2.3.4
- name: Set up Python ${{ matrix.python }}
id: python
uses: actions/setup-python@v2.2.2
with:
python-version: ${{ matrix.python }}
- name: Install workflow dependencies
run: |
python3 -m pip install -r .github/workflows/requirements.txt
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: Install dependencies
run: poetry install --no-interaction
- name: Check formatting
run: poetry run black --check hpke tests
- name: Check types
run: poetry run mypy hpke
- name: Run tests and ensure 100% line coverage
run: poetry run pytest --cov-fail-under=100 --cov hpke tests
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.python }}-${{ matrix.os }}
path: .coverage