-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
37463d5
commit 696725f
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Run integration tests when a maintainer comments `!test` on a PR to feature branch | ||
# Fails when base branch is `main`, as it doesn't support e2e tests | ||
name: End to end integration tests | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
integration-tests-e2e: | ||
name: E2E verification | ||
runs-on: buildjet-16vcpu-ubuntu-2204 | ||
if: | ||
github.event.issue.pull_request | ||
&& github.event.issue.state == 'open' | ||
&& contains(github.event.comment.body, '!test') | ||
&& (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') | ||
steps: | ||
- uses: xt0rted/pull-request-comment-branch@v2 | ||
id: comment-branch | ||
|
||
- name: Exit if base branch is `main` | ||
if: ${{ steps.comment-branch.outputs.base_ref == 'main' }} | ||
run: | | ||
echo "Cannot run end2end integration tests on PR targeting `main`" | ||
exit 1 | ||
continue-on-error: false | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Checkout PR branch | ||
run: gh pr checkout $PR_NUMBER | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
PR_NUMBER: ${{ github.event.issue.number }} | ||
|
||
- name: Comment on successful run | ||
uses: peter-evans/create-or-update-comment@v3 | ||
with: | ||
issue-number: ${{ github.event.issue.number }} | ||
body: | | ||
End-to-end `!test` action succeeded! :rocket: | ||
https://github.com/lurk-lab/solidity-verifier/actions/runs/${{ github.run_id }} |