poetry update #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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'] | |
steps: | |
- name: Check out code from GitHub | |
uses: actions/[email protected] | |
- name: Set up Python ${{ matrix.python }} | |
id: python | |
uses: actions/[email protected] | |
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/[email protected] | |
with: | |
name: coverage-${{ matrix.python }}-${{ matrix.os }} | |
path: .coverage | |