Skip to content

Commit

Permalink
Add E2E tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zaycev committed Dec 4, 2023
1 parent 3cea592 commit 6fd4d89
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 66 deletions.
11 changes: 0 additions & 11 deletions .github/actions/e2e-prepare-containers/action.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
name: Prepare Docker containers
description: Prepare Docker containers for E2E tests.
inputs:
username:
description: DockerHub username
required: true
password:
description: DockerHub password/token
required: true
maildev:
description: Maildev
required: true
Expand All @@ -32,11 +26,6 @@ inputs:
runs:
using: "composite"
steps:
- name: Authenticate to prevent API rate limit
uses: docker/login-action@v3
with:
username: ${{ inputs.username }}
password: ${{ inputs.password }}

- name: Start Containers
run: |
Expand Down
55 changes: 0 additions & 55 deletions .github/workflows/trunk-hourly-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,58 +164,3 @@ jobs:
./cypress
./logs/test.log
if-no-files-found: ignore

e2e-tests-skipped-stub:
needs: [e2e-tests, e2e-matrix-builder]
runs-on: ${{ matrix.runner }}
timeout-minutes: 5
name: e2e-tests-${{ matrix.name }}-${{ matrix.edition }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.e2e-matrix-builder.outputs.matrix) }}
steps:
- run: |
echo "Didn't run due to conditional filtering"
visual-regression-tests:
runs-on: ubuntu-22.04
timeout-minutes: 60
needs: [build]
name: percy-visual-regression-tests
steps:
- uses: actions/checkout@v3

- name: Prepare Docker containers
uses: ./.github/actions/e2e-prepare-containers
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
maildev: true

- name: Retrieve uberjar artifact for ${{ matrix.edition }}
uses: actions/download-artifact@v3
with:
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar

- name: Get the version info
run: |
jar xf target/uberjar/metabase.jar version.properties
mv version.properties resources/
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend

- name: Prepare JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'

- name: Prepare Cypress environment
id: cypress-prep
uses: ./.github/actions/prepare-cypress

- name: Percy Test
run: yarn run test-visual-run --browser ${{ steps.cypress-prep.outputs.chrome-path }}
env:
PERCY_TOKEN: ${{ github.ref == 'refs/heads/master' && secrets.PERCY_TOKEN || ''}}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@
"mochawesome": "^7.1.3",
"mochawesome-merge": "^4.2.1",
"mochawesome-report-generator": "^6.2.0",
"mocha-junit-reporter": "^2.2.0",
"mockdate": "^2.0.2",
"mutationobserver-shim": "^0.3.7",
"mysql2": "^3.6.3",
Expand Down

0 comments on commit 6fd4d89

Please sign in to comment.