Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure precommit checks happen on PR code #2588

Merged
merged 1 commit into from
Apr 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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