Update release workflow to use latest Ubuntu instead of 18.04 #75
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: Lint with flake8 | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
env: | |
PRE_COMMIT_HOME: ${{ github.workspace }}/pre-commit-cache | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
id: python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Restore pre-commit environment | |
uses: actions/cache@v2 | |
with: | |
path: ${{ env.PRE_COMMIT_HOME }} | |
key: "${{ runner.os }}-\ | |
precommit-\ | |
${{ steps.python.outputs.python-version }}-\ | |
${{ hashFiles('.pre-commit-config.yaml') }}" | |
- name: Install flake8 and plugins from setup.py | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[dev] | |
- name: Run pre-commit hooks | |
run: pre-commit run --all-files |