Skip to content

Bump pre-commit from 2.19.0 to 3.4.0 #563

Bump pre-commit from 2.19.0 to 3.4.0

Bump pre-commit from 2.19.0 to 3.4.0 #563

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Run Tests
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
CACHE_VERSION: 1
DEFAULT_PYTHON: 3.9
PRE_COMMIT_CACHE: ~/.cache/pre-commit
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: 'pip'
cache-dependency-path: requirements-dev.txt
- name: Install dev dependencies
run: pip install -r requirements-dev.txt
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/[email protected]
with:
path: ${{ env.PRE_COMMIT_CACHE }}
key: >-
${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install pre-commit dependencies
if: steps.cache-precommit.outputs.cache-hit != 'true'
run: pre-commit install-hooks
- name: Run pre-commit
run: pre-commit run --hook-stage manual --all-files --show-diff-on-failure
- name: Run unit-tests
run: python -m pytest