@@ -10,6 +10,11 @@ inputs:
1010 it to ''.
1111 required : false
1212 default : " @smoke"
13+ threads :
14+ description :
15+ Amount of parallel executors. Supported values are 1-3.
16+ required : false
17+ default : " 1"
1318 video :
1419 description :
1520 Turn video on or off. Supported values are 'true' and 'false'.
@@ -19,25 +24,27 @@ inputs:
1924runs :
2025 using : " composite"
2126 steps :
22- - name : Run tests using the e2e docker bundle's cypress container
27+ - name : Run the tests
2328 if : inputs.video == 'false'
2429 run : |
2530 docker exec cypress \
26- bash -c "yarn test:e2e --env grepTags='${{ inputs.test-tags }}'"
31+ bash -c "yarn ws:db build && yarn ws:e2e cypress-parallel --script cy:run --threads ${{ inputs.threads }} \
32+ --verbose --reporterModulePath '../node_modules/cypress-multi-reporters' --specsDir 'e2e/*.cy.ts' --weightsJson './parallel-weights.json'"
2733 shell : bash
2834
29- - name : Run tests and enable video
35+ - name : Run the tests and record video
3036 if : inputs.video == 'true'
3137 run : |
3238 docker exec cypress \
33- bash -c "yarn test:e2e --config-file cypress.config.video.ts --env grepTags='${{ inputs.test-tags }}'"
39+ bash -c "yarn ws:db build && yarn ws:e2e cypress-parallel --script cy:run:video --threads ${{ inputs.threads }} \
40+ --verbose --reporterModulePath '../node_modules/cypress-multi-reporters' --specsDir 'e2e/*.cy.ts' --weightsJson './parallel-weights.json'"
3441 shell : bash
3542
3643 - name : Retrieve test reports from container
3744 # should be run even if the tests fail
3845 if : always()
3946 run : |
40- docker cp cypress:/e2e/cypress/reports ${{ github.workspace }}/cypress/ || echo "No reports"
47+ docker cp cypress:/e2e/cypress/reports ${{ github.workspace }}/test-reports || echo "No reports"
4148 shell : bash
4249
4350 - name : Upload test reports as an artifact
4754 with :
4855 name : cypress-docker-reports
4956 path : |
50- ${{ github.workspace }}/cypress/ reports
57+ ${{ github.workspace }}/test- reports
5158
5259 - name : Fail the job
5360 # should fail the job if the tests fail
0 commit comments