Skip to content

Commit

Permalink
Added pre-commit to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Nov 16, 2022
1 parent 5ec3d93 commit faa8ca3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,24 @@ env:
CACHE_VERSION: 3

jobs:
pre_commit:
name: Run pre-commit hooks
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: "1"
- name: set PY
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: pre-commit
uses: pre-commit/action@v3.0.0
test_suite:
name: Pytest on ${{ matrix.os }} with Python ${{ matrix.python-version }}
needs: [pre_commit]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -110,6 +126,7 @@ jobs:
codecov
test_suite_36:
name: Pytest on ${{ matrix.os }} with Python ${{ matrix.python-version }}
needs: [pre_commit]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down

0 comments on commit faa8ca3

Please sign in to comment.