Bump ruff from 0.5.1 to 0.6.8 #393
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: 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/[email protected] | |
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/[email protected] | |
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/[email protected] | |
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/[email protected] | |
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 |