From 544a8f9ae90bcafc1b7ddd4d661e2502a0aefc4a Mon Sep 17 00:00:00 2001 From: Tom Harding Date: Mon, 12 Feb 2024 09:18:01 +0100 Subject: [PATCH] Use the new Postgres E2E stuff (sans Docker) --- .github/workflows/e2e-test.yaml | 65 +++++++++++---------------------- 1 file changed, 22 insertions(+), 43 deletions(-) diff --git a/.github/workflows/e2e-test.yaml b/.github/workflows/e2e-test.yaml index 206d80277..747cd872a 100644 --- a/.github/workflows/e2e-test.yaml +++ b/.github/workflows/e2e-test.yaml @@ -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