Skip to content

Commit

Permalink
Merge pull request #2588 from tmjd/ci-precommit-check
Browse files Browse the repository at this point in the history
Ensure precommit checks happen on PR code
  • Loading branch information
tmjd committed Apr 21, 2023
2 parents ec8567b + 4e0cdf4 commit b3d6ccd
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .semaphore/semaphore.yml
Expand Up @@ -43,8 +43,21 @@ global_job_config:
- 'cache restore bin-amd64-${SEMAPHORE_GIT_SHA}'

blocks:
- name: 'Build amd64'
- name: 'Pre-commit verification'
dependencies: []
run:
when: "pull_request =~ '.*'"
task:
jobs:
- name: Test pre-commit checks
execution_time_limit:
minutes: 15
commands:
# reset so it looks like we haven't committed yet
- git reset --soft $(git merge-base $SEMAPHORE_GIT_BRANCH HEAD)
- make pre-commit
- name: 'Build amd64'
dependencies: ["Pre-commit verification"]
task:
jobs:
- name: Build amd64
Expand Down

0 comments on commit b3d6ccd

Please sign in to comment.