chore(deps): unpin upper bounds for Python and other dependencies #95
Workflow file for this run
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: test | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
linting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- uses: actions/cache@v3 | |
id: cache-venv | |
with: | |
path: .venv | |
key: venv-0 | |
- run: | | |
python -m venv .venv --upgrade-deps | |
source .venv/bin/activate | |
pip install pre-commit | |
if: steps.cache-venv.outputs.cache-hit != 'true' | |
- uses: actions/cache@v3 | |
id: pre-commit-cache | |
with: | |
path: ~/.cache/pre-commit | |
key: key-0 | |
- run: | | |
source .venv/bin/activate | |
pre-commit run --all-files | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ "3.8.13", "3.9.13", "3.10.6", "3.11.0-rc.1" ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- uses: actions/cache@v3 | |
id: poetry-cache | |
with: | |
path: ~/.local | |
key: key-1 | |
- uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: false | |
version: latest | |
- uses: actions/cache@v3 | |
id: cache-venv | |
with: | |
path: .venv | |
key: ${{ hashFiles('**/poetry.lock') }}-0 | |
- run: | | |
python -m venv .venv | |
source .venv/bin/activate | |
pip install -U pip | |
poetry install --no-interaction --no-root --extras all | |
if: steps.cache-venv.outputs.cache-hit != 'true' | |
- run: source .venv/bin/activate && pip install coverage[toml] | |
if: matrix.python-version == '3.10' | |
- name: Run tests | |
run: | | |
source .venv/bin/activate | |
pytest --cov=asgi_correlation_id tests/ --cov-report=xml | |
coverage report | |
- uses: codecov/codecov-action@v4 | |
with: | |
file: ./coverage.xml | |
fail_ci_if_error: true | |
if: matrix.python-version == '3.10' |