From 8e7780823dbef4d31dee6163b03ec487785ce6ec Mon Sep 17 00:00:00 2001 From: halfwhole Date: Fri, 29 Dec 2023 15:42:30 +0800 Subject: [PATCH] chore: add e2e test artifacts --- .github/workflows/ci.yml | 8 ++++++++ package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1aa7d194..ca16384f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,8 +90,16 @@ jobs: ${{ runner.OS }}-node- ${{ runner.OS }}- - run: npm ci --legacy-peer-deps + - run: npm i @ffmpeg-installer/ffmpeg # install ffmpeg for testcafe to record videos - run: echo CLOUDMERSIVE_KEY=${{secrets.CLOUDMERSIVE_KEY}} >> .env - run: npm run test:e2e-headless + - name: Upload test artifacts + if: ${{ failure() }} + uses: actions/upload-artifact@v4 + with: + name: e2e-test-artifacts + path: ./test/end-to-end/artifacts + integration: name: Integration Tests runs-on: ubuntu-22.04 diff --git a/package.json b/package.json index 2f46ae49..693942c2 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "test": "jest --collectCoverage", "test:ci": "jest --coverage && coveralls < coverage/lcov.info", "test:e2e": "testcafe chrome ./test/end-to-end --app \"npm run dev\" --app-init-delay 270000", - "test:e2e-headless": "testcafe chrome:headless ./test/end-to-end --app \"npm run dev\" --app-init-delay 270000", + "test:e2e-headless": "testcafe chrome:headless ./test/end-to-end --app \"npm run dev\" --app-init-delay 270000 --video ./test/end-to-end/artifacts/videos -s takeOnFails=true,path=./test/end-to-end/artifacts/screenshots", "test:integration": "jest --config=./test/integration/jest.config.js ./test/integration", "cz": "git-cz", "prepare": "husky install"