From ef580417bb9267b7abb3be89fb7f5118d5ac5128 Mon Sep 17 00:00:00 2001 From: Miguel Lehmann Date: Thu, 5 Dec 2024 15:58:01 +0100 Subject: [PATCH] run e2e test --- .github/workflows/frontend-test-action.yml | 50 +++++++++++----------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/frontend-test-action.yml b/.github/workflows/frontend-test-action.yml index 646a68ba53..dad2a90879 100644 --- a/.github/workflows/frontend-test-action.yml +++ b/.github/workflows/frontend-test-action.yml @@ -22,28 +22,28 @@ jobs: - name: Run unit tests run: npm test -# get-e2e-files: -# runs-on: ubuntu-24.04 -# outputs: -# file_list: ${{ steps.generate-file-list.outputs.file_list }} -# steps: -# - name: Checkout -# uses: actions/checkout@v4 -# -# - name: Generate file list -# id: generate-file-list -# run: | -# FILES=$(ls frontend/cypress/e2e | jq -R . | jq -s . | jq -c) -# echo $FILES -# echo "file_list=$FILES" >> $GITHUB_OUTPUT + get-e2e-files: + runs-on: ubuntu-24.04 + outputs: + file_list: ${{ steps.generate-file-list.outputs.file_list }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Generate file list + id: generate-file-list + run: | + FILES=$(ls frontend/cypress/e2e | jq -R . | jq -s . | jq -c) + echo $FILES + echo "file_list=$FILES" >> $GITHUB_OUTPUT e2e: -# needs: get-e2e-files + needs: get-e2e-files runs-on: ubuntu-24.04 -# strategy: -# fail-fast: false -# matrix: -# file: ${{ fromJSON(needs.get-e2e-files.outputs.file_list) }} + strategy: + fail-fast: false + matrix: + file: ${{ fromJSON(needs.get-e2e-files.outputs.file_list) }} steps: - name: Checkout uses: actions/checkout@v4 @@ -77,13 +77,13 @@ jobs: wait-on-timeout: 120 browser: chrome headed: false - spec: cypress/e2e/tab.cy.ts + spec: cypress/e2e/${{ matrix.file }} -# - uses: actions/upload-artifact@v4 -# if: always() -# with: -# name: cypress-screenshots for ${{ matrix.file }} -# path: frontend/cypress/screenshots + - uses: actions/upload-artifact@v4 + if: always() + with: + name: cypress-screenshots for ${{ matrix.file }} + path: frontend/cypress/screenshots - name: remove docker containers run: docker ps -aq | xargs -r docker rm -f \ No newline at end of file