Created
April 7, 2022 17:27
-
-
Save elisim/49baa378bb0f95f54a62401f22d050b4 to your computer and use it in GitHub Desktop.
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
# This workflow finds which files was changed, print them, and then | |
# run `pre-commit` on those files. I was inspired by sktime: | |
# https://github.com/alan-turing-institute/sktime/blob/main/.github/workflows/build-and-test.yml | |
name: Code Quality | |
on: | |
pull_request: | |
branches: | |
- main | |
- develop | |
jobs: | |
code-quality: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
- id: file_changes | |
uses: trilom/[email protected] | |
with: | |
output: " " | |
- name: List changed files | |
run: echo '${{ steps.file_changes.outputs.files}}' | |
- uses: pre-commit/[email protected] | |
with: | |
extra_args: --files ${{ steps.file_changes.outputs.files}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment