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

Compile-time E2E checks #350

Merged
merged 4 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
60 changes: 60 additions & 0 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Postgres E2E tests

on:
merge_group:
push:
pull_request:

jobs:
run_postgres_e2es:
name: Run Postgres E2Es
runs-on: ubuntu-latest

steps:
- name: Install `just`
uses: extractions/setup-just@v1

- name: Log in to GitHub Container Registry 📦
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Check out ndc-postgres
uses: actions/checkout@v3
with:
path: ndc-postgres

- name: Build ndc-postgres
run: cargo build
working-directory: ndc-postgres

- name: Check out v3-engine
uses: actions/checkout@v3
with:
repository: hasura/v3-engine
path: v3-engine
token: ${{ secrets.E2E_WORKFLOW_PAT }}

- name: Build v3-engine
run: cargo build
working-directory: v3-engine

- name: Check out v3-e2e-testing
uses: actions/checkout@v3
with:
repository: hasura/v3-e2e-testing
path: v3-e2e-testing
token: ${{ secrets.E2E_WORKFLOW_PAT }}

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

- name: Upload logs
if: always()
uses: actions/upload-artifact@v3
with:
name: logs
path: v3-e2e-testing/crates/postgres/static/logs
32 changes: 0 additions & 32 deletions .github/workflows/ship.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,35 +237,3 @@ jobs:
draft: true
bodyFile: release/notes.md
artifacts: release/artifacts/*

e2e-testing:
name: check against end-to-end tests
needs:
- push-docker-images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Create docker tag
id: create-tag
run: echo "docker_tag=$(git rev-parse --short=9 ${{ github.sha }})" >> $GITHUB_OUTPUT

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

- name: Report failures
if: always() && github.ref == 'refs/heads/main'
uses: ravsamhq/notify-slack-action@v2
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 }}
Loading