Skip to content

Commit

Permalink
fix: pipeline workflow pre-commit step
Browse files Browse the repository at this point in the history
  • Loading branch information
shawalli committed Apr 10, 2021
1 parent 6e17d2e commit c6ee596
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v2

- name: Checkout master and PR branch
run: |
git fetch --no-tags --depth=1 origin +refs/heads/${{ github.base_ref }}
git fetch --no-tags --depth=1 origin ${{ github.sha }}
- name: Setup Python
uses: actions/setup-python@v2
with:
Expand Down Expand Up @@ -53,9 +58,7 @@ jobs:

- name: Run pre-commit
if: github.event_name == 'pull_request'
run: |
git fetch origin master:master
poetry run pre-commit run --from-ref master --to-ref HEAD
run: poetry run pre-commit run --show-diff-on-failure --files $(git diff --name-only --no-ext-diff -z origin/master..HEAD)

test:
name: 🧪
Expand Down

0 comments on commit c6ee596

Please sign in to comment.