Skip to content

Bump pytest-cov from 5.0.0 to 6.0.0 #434

Bump pytest-cov from 5.0.0 to 6.0.0

Bump pytest-cov from 5.0.0 to 6.0.0 #434

Workflow file for this run

---
name: Checks
on:
push:
pull_request:
env:
CACHE_VERSION: 1
KEY_PREFIX: base-venv
DEFAULT_PYTHON: '3.11'
PRE_COMMIT_CACHE: ~/.cache/pre-commit
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
prepare-base:
name: Prepare base dependencies
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
python-key: ${{ steps.generate-python-key.outputs.key }}
pre-commit-key: ${{ steps.generate-pre-commit-key.outputs.key }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v5
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
- name: Generate partial Python venv restore key
id: generate-python-key
run: >-
echo "key=${{ env.KEY_PREFIX }}-${{ env.CACHE_VERSION }}-${{
hashFiles('pyproject.toml', 'requirements/**.txt') }}" >> $GITHUB_OUTPUT
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v4.0.2
with:
path: .venv
key: >-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
steps.generate-python-key.outputs.key }}
- name: Generate pre-commit restore key
id: generate-pre-commit-key
run: >-
echo "key=pre-commit-${{ env.CACHE_VERSION }}-${{
hashFiles('.pre-commit-config.yaml') }}" >> $GITHUB_OUTPUT
- name: Restore pre-commit environment
id: cache-precommit
uses: actions/cache@v4.0.2
with:
path: ${{ env.PRE_COMMIT_CACHE }}
key: >-
${{ runner.os }}-${{ steps.generate-pre-commit-key.outputs.key }}
- name: Install Dependencies
if: steps.cache-venv.outputs.cache-hit != 'true'
run: make install
pylint:
name: pylint
runs-on: ubuntu-latest
timeout-minutes: 10
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v5
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v4.0.2
with:
path: .venv
fail-on-cache-miss: true
key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ needs.prepare-base.outputs.python-key }}
- name: Restore pre-commit environment
id: cache-precommit
uses: actions/cache@v4.0.2
with:
path: ${{ env.PRE_COMMIT_CACHE }}
fail-on-cache-miss: true
key: ${{ runner.os }}-${{ needs.prepare-base.outputs.pre-commit-key }}
- name: install dependencies
run: make install
- name: Run pylint checks
run: |
. .venv/bin/activate
pre-commit run pylint --all-files