Skip to content

Commit

Permalink
Use the new Postgres E2E stuff (sans Docker)
Browse files Browse the repository at this point in the history
  • Loading branch information
i-am-tom committed Feb 12, 2024
1 parent 04e342b commit 544a8f9
Showing 1 changed file with 22 additions and 43 deletions.
65 changes: 22 additions & 43 deletions .github/workflows/e2e-test.yaml
Original file line number Diff line number Diff line change
@@ -1,57 +1,36 @@
name: E2E release compatibility

on:
workflow_run:
workflows:
- deploy
types:
- completed
branches:
- main
merge_group:
push:
pull_request:

jobs:
end_to_end_release_compatibility:
name: Check PR against end-to-end tests
name: Postgres tests
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/checkout@v4

# pull requests create a new merge commit so we have to work our way back
# to the actual commit so it matches the Docker image
- name: Generate short SHA
id: short-git-hash
run: |
if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
GITHUB_SHA=$(cat $GITHUB_EVENT_PATH | jq -r .pull_request.head.sha)
fi
echo "hash=$(git rev-parse --short=9 "$GITHUB_SHA")" >> $GITHUB_OUTPUT
steps:
- name: Install `just`
uses: extractions/setup-just@v1

- name: Dispatch Postgres E2E tests
uses: aurelien-baudet/workflow-dispatch@v2
- name: Check out `ndc-postgres`
uses: actions/checkout@v3
with:
inputs: '{ "connector": "${{ steps.short-git-hash.outputs.hash }}" }'
repo: hasura/v3-e2e-testing
ref: main
token: ${{ secrets.E2E_WORKFLOW_PAT }}
workflow: "cargo test postgres"
repository: hasura/ndc-postgres
path: ndc-postgres

- name: Dispatch Postgres Config Server E2E tests
uses: aurelien-baudet/workflow-dispatch@v2
- name: Check out `v3-engine`
uses: actions/checkout@v3
with:
inputs: '{ "connector": "${{ github.sha }}" }'
repo: hasura/v3-e2e-testing
ref: main
token: ${{ secrets.E2E_WORKFLOW_PAT }}
workflow: "cargo test postgres-config-server"
repository: hasura/v3-engine
path: v3-engine

- name: Report failures
if: always() && github.ref == 'refs/heads/main'
uses: ravsamhq/notify-slack-action@v2
- name: Check out `v3-e2e-testing`
uses: actions/checkout@v3
with:
status: ${{ job.status }}
notify_when: failure
notification_title: "${{ github.actor }}, *nap time is over*! The following commit to <{repo_url}|{repo}> broke the end-to-end tests:"
message_format: "${{ github.event.head_commit.message }}"
env:
SLACK_WEBHOOK_URL: ${{ secrets.BROKEN_E2E_SLACK_WEBHOOK_URL }}
path: v3-e2e-testing

- name: Run the tests
run: just test-postgres-new
working-directory: v3-e2e-testing

0 comments on commit 544a8f9

Please sign in to comment.