ci(gha)(deps): bump actions/setup-python from 4 to 5 #112
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
jobs: | |
CI: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python_ver: [ '3.7', '3.8', '3.9', '3.10', '3.11' ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install poetry | |
run: | | |
pipx install poetry | |
poetry lock | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python_ver }} | |
cache: 'poetry' | |
- name: Install dependencies | |
run: poetry install --no-root --sync | |
- name: Lint with flake8 | |
run: | | |
poetry run flake8 . | |
- name: Type check with mypy | |
run: | | |
poetry run mypy -p loopmon | |
- name: Test with pytest | |
run: | | |
poetry run pytest tests --cov loopmon --cov-config pyproject.toml --cov-report xml | |
- name: "Upload coverage to Codecov" | |
uses: codecov/codecov-action@v3 | |
with: | |
fail_ci_if_error: true | |
flags: "${{ matrix.python_ver }}" |