Skip to content

Update hasura/graphql-engine Docker tag to v2.44.0 #1383

Update hasura/graphql-engine Docker tag to v2.44.0

Update hasura/graphql-engine Docker tag to v2.44.0 #1383

Workflow file for this run

name: Push image to Docker hub and run e2e tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
push_to_registry:
name: Build & Push docker image to Docker Hub
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Extract metadata to env variables
uses: HSLdevcom/jore4-tools/github-actions/extract-metadata@extract-metadata-v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: 'arm64'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.JORE4_DOCKERHUB_USER }}
password: ${{ secrets.JORE4_DOCKERHUB_TOKEN }}
- name: Build and push dev builds to Docker Hub
run: |
docker buildx build \
--push \
--platform linux/amd64,linux/arm64 \
--target hasura-generic \
--cache-from type=registry,ref=$IMAGE_NAME:generic \
--tag $IMAGE_NAME:generic-$COMMIT_ID \
.
docker buildx build \
--push \
--platform linux/amd64,linux/arm64 \
--target hasura-hsl \
--cache-from type=registry,ref=$IMAGE_NAME:hsl \
--tag $IMAGE_NAME:hsl-$COMMIT_ID \
.
- name: Build and push :latest tag to Docker Hub
if: ${{ github.ref == 'refs/heads/main' }}
run: |
docker buildx build \
--push \
--platform linux/amd64,linux/arm64 \
--target hasura-generic \
--cache-to type=registry,ref=$IMAGE_NAME:generic,mode=max \
--tag $IMAGE_NAME:generic \
.
docker buildx build \
--push \
--platform linux/amd64,linux/arm64 \
--target hasura-hsl \
--cache-to type=registry,ref=$IMAGE_NAME:hsl,mode=max \
--tag $IMAGE_NAME:latest \
.
run_dump_tests:
needs:
- push_to_registry
uses: ./.github/workflows/check-dump.yml
run_e2e_tests:
needs: push_to_registry
name: Run e2e tests
runs-on: ubuntu-22.04
steps:
- name: Extract metadata to env variables
uses: HSLdevcom/jore4-tools/github-actions/extract-metadata@extract-metadata-v1
- name: start e2e env
uses: HSLdevcom/jore4-tools/github-actions/setup-e2e-environment@setup-e2e-environment-v4
with:
hasura_version: '${{ env.IMAGE_NAME }}:hsl-${{ env.COMMIT_ID }}'
- name: Seed infrastructure links
uses: HSLdevcom/jore4-tools/github-actions/seed-infrastructure-links@seed-infrastructure-links-v2
- name: Run e2e tests
uses: HSLdevcom/jore4-tools/github-actions/run-cypress-tests@run-cypress-tests-v1
run_migration_tests:
needs: push_to_registry
name: Run migration tests
runs-on: ubuntu-22.04
strategy:
matrix:
imagePrefix: ['generic-', 'hsl-']
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Extract metadata to env variables
uses: HSLdevcom/jore4-tools/github-actions/extract-metadata@extract-metadata-v1
- name: start e2e env
uses: HSLdevcom/jore4-tools/github-actions/setup-e2e-environment@setup-e2e-environment-v4
with:
hasura_version: '${{ env.IMAGE_NAME }}:${{ matrix.imagePrefix }}${{ env.COMMIT_ID }}'
# Running the all migrations down and up to make sure that they all work as intended
- name: Run migration tests for both network and timetables databases
run: ./scripts/test-migrations.sh
run_integration_tests:
needs: push_to_registry
name: Run hasura integration tests
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- imagePrefix: 'generic-'
testCommand: 'yarn qa' # includes linter, prettier and ts:check as well
- imagePrefix: 'hsl-'
testCommand: 'yarn test-hsl' # only runs the tests
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Extract metadata to env variables
uses: HSLdevcom/jore4-tools/github-actions/extract-metadata@extract-metadata-v1
- name: start e2e env
uses: HSLdevcom/jore4-tools/github-actions/setup-e2e-environment@setup-e2e-environment-v4
with:
hasura_version: '${{ env.IMAGE_NAME }}:${{ matrix.imagePrefix }}${{ env.COMMIT_ID }}'
- name: Run integration tests
run: |
cd test/hasura
yarn --frozen-lockfile
${{ matrix.testCommand }}