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

Run E2E tests on every push/PR in this repo #116

Merged
merged 40 commits into from
Nov 1, 2023
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
2435a66
Let's have a look
i-am-tom Oct 30, 2023
0bb724f
Token
i-am-tom Oct 30, 2023
d1a714d
Maybe?
i-am-tom Oct 30, 2023
c062d4e
??
i-am-tom Oct 30, 2023
dbdb81b
No action
i-am-tom Oct 30, 2023
6e4e25d
escaping
i-am-tom Oct 30, 2023
76bca1b
??
i-am-tom Oct 30, 2023
1b0438f
GH_TOKEN
i-am-tom Oct 30, 2023
2fa17a0
main
i-am-tom Oct 30, 2023
dc0ade9
ref
i-am-tom Oct 30, 2023
e92107e
ssh
i-am-tom Oct 30, 2023
9cce546
Auth login
i-am-tom Oct 30, 2023
1a22a73
Jesus please
i-am-tom Oct 30, 2023
a5f5a6a
Sattus
i-am-tom Oct 30, 2023
18ede6f
Show the things
i-am-tom Oct 30, 2023
5a536b3
?
i-am-tom Oct 30, 2023
d32b3f3
Back to the action
i-am-tom Oct 30, 2023
ccb65bc
Maybe
i-am-tom Oct 30, 2023
e3c6cf1
Maybe this?
i-am-tom Oct 30, 2023
6b12509
Yes
i-am-tom Oct 30, 2023
5c9f68f
Ref?
i-am-tom Oct 30, 2023
0ce7208
refs
i-am-tom Oct 30, 2023
1640e0e
yaml
i-am-tom Oct 30, 2023
8bb98bb
Does this work
i-am-tom Oct 30, 2023
74f2ba0
?
i-am-tom Oct 30, 2023
ae56d3e
rtfm
i-am-tom Oct 30, 2023
6016588
Both
i-am-tom Oct 30, 2023
1dd9278
Plan C
i-am-tom Oct 30, 2023
a1a1326
Refs
i-am-tom Oct 30, 2023
f048314
Yes?
i-am-tom Oct 30, 2023
b80c5ac
Merge branch 'main' into i-am-tom/e2e-magic
i-am-tom Oct 31, 2023
220464a
Wait for docker
i-am-tom Oct 31, 2023
d6829e6
Running workflow?
i-am-tom Oct 31, 2023
d79e5b6
PR head
i-am-tom Oct 31, 2023
66601cf
Use workflow_run
i-am-tom Oct 31, 2023
bdde1cd
Oops
i-am-tom Oct 31, 2023
28a918f
Different name?
i-am-tom Oct 31, 2023
3db41ea
Check name?
i-am-tom Oct 31, 2023
d4acd7f
Use short SHA
i-am-tom Oct 31, 2023
ad4952f
Merge branch 'main' into i-am-tom/e2e-magic
i-am-tom Oct 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/e2e-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: end-to-end release compatibility

on:
merge_group:
push:
pull_request:
Comment on lines +4 to +6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means that the job runs twice on each commit?

Screenshot from 2023-11-01 10-42-16

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty much; there's no way to tell GitHub "push xor pull_request".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess could make it only work on pushes to main, then it'd only run double on those.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW I like it that I can push a branch and have all tests run without having to open a PR.


jobs:
end_to_end_release_compatibility:
name: Check PR against end-to-end tests
runs-on: ubuntu-latest

steps:
- name: Generate short SHA
uses: benjlevesque/[email protected]
id: short-sha
with:
length: 9

- name: Wait for Docker image to be created
uses: lewagon/[email protected]
with:
ref: "${{ github.event.pull_request.head.sha || github.sha }}"
check-name: "build and deploy (ndc-postgres)"
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Dispatch E2E tests
uses: aurelien-baudet/workflow-dispatch@v2
id: workflow_dispatch
with:
inputs: '{ "connector": "${{ steps.short-sha.outputs.sha }}" }'
repo: hasura/v3-e2e-testing
ref: main
token: ${{ secrets.E2E_WORKFLOW_PAT }}
workflow: "cargo test postgres"