Skip to content

Commit

Permalink
Check runs are now also trigged by PRs
Browse files Browse the repository at this point in the history
This should catch issues before they are merged.
Relates to #134
  • Loading branch information
jorisroovers committed Jun 23, 2020
1 parent 5863de0 commit 6e17d6c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Tests and Checks

on: [push]
on: [push, pull_request]

jobs:
checks:
Expand All @@ -11,6 +11,8 @@ jobs:
os: ["macos-latest", "ubuntu-latest"]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }} # Checkout pull request HEAD commit instead of merge commit

- name: Setup python
uses: actions/setup-python@v1
Expand Down Expand Up @@ -58,7 +60,7 @@ jobs:
# github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Gitlint check
run: ./run_tests.sh -g
run: ./run_tests.sh -g --debug

windows-checks:
runs-on: windows-latest
Expand All @@ -67,6 +69,8 @@ jobs:
python-version: [2.7, 3.5]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }} # Checkout pull request HEAD commit instead of merge commit

- name: Setup python
uses: actions/setup-python@v1
Expand Down
2 changes: 1 addition & 1 deletion run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ run_integration_tests(){

run_git_check(){
echo -ne "Running gitlint...${RED}"
RESULT=$(gitlint 2>&1)
RESULT=$(gitlint $testargs 2>&1)
local exit_code=$?
handle_test_result $exit_code "$RESULT"
# FUTURE: check if we use str() function: egrep -nriI "( |\(|\[)+str\(" gitlint | egrep -v "\w*#(.*)"
Expand Down

0 comments on commit 6e17d6c

Please sign in to comment.