Skip to content

Commit

Permalink
Add e2e tests CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pallost committed Mar 16, 2023
1 parent ae98fa9 commit 6cb7bfe
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,8 @@ jobs:
--cache-from type=registry,ref=$IMAGE_NAME:builder \
--tag $IMAGE_NAME:latest \
.
run_cypress_tests:
needs:
- push_to_registry
uses: ./.github/workflows/run-cypress-tests.yml
32 changes: 32 additions & 0 deletions .github/workflows/run-cypress-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Run cypress tests

on:
# this workflow is only called by others, won't be executed on itself
# as it uses the pre-built docker image that is produced in the upstream job
workflow_call:

jobs:
run_cypress_tests:
name: Run cypress e2e tests from docker
runs-on: ubuntu-20.04

steps:
- name: Collect Workflow Telemetry
uses: runforesight/foresight-workflow-kit-action@v1
if: ${{ always() }}
with:
api_key: ${{ secrets.FORESIGHT_GITHUB_ACTIONS }}

- 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-v1
with:
hastus_version: "${{ env.IMAGE_NAME }}:${{ env.COMMIT_ID }}"

- name: Run e2e tests from github action
uses: HSLdevcom/jore4-tools/github-actions/run-cypress-tests@run-cypress-tests-v1

0 comments on commit 6cb7bfe

Please sign in to comment.