Skip to content

Commit

Permalink
Run cypress tests on manually 3.14 (#4897)
Browse files Browse the repository at this point in the history
* Run cy manually on 3.14

* Add base url to config

* Run cypress tests manually 3.15 (#4891)

* Run cy manually on 3.15

* Add base url to config

* Fix run tests on release 3.15

* Run cypress tests on release 3.15 (#4892)

* Run cy manually on 3.15

* Add base url to config

* Fix run tests on release 3.15

* Fix run tests on release 3.15

* Fix run cy manually
  • Loading branch information
karola312 authored May 28, 2024
1 parent 2f479d9 commit b054bd9
Show file tree
Hide file tree
Showing 7 changed files with 271 additions and 775 deletions.
51 changes: 51 additions & 0 deletions .github/actions/combineReportsFromE2E/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: combine-e2e-results
description: "Combines reports from matrix and upload them as one"
runs:
using: "composite"
steps:
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: npm
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-qa-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-qa-${{ env.cache-name }}-
${{ runner.os }}-qa-
${{ runner.os }}-
- name: Install Dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
shell: bash
run: NODE_OPTIONS=--max_old_space_size=4096 npm ci
- run: npm ci
shell: bash
working-directory: .github/workflows
- name: Download reports artifacts
uses: actions/download-artifact@v3
with:
path: ./cypress/reports
- name: Create reports dir
shell: bash
continue-on-error: true
run: npm run qa:create-artifacts-dirs
- name: Merge report files
shell: bash
continue-on-error: true
run: npm run qa:generate-html-report
- name: Move artifacts screenshots into reports dir
shell: bash
continue-on-error: true
run: npm run qa:artifact-move-screenshots
- name: Upload reports
uses: actions/upload-artifact@v3
if: always()
with:
name: combined-report
path: ./cypress/reports
retention-days: 5
if-no-files-found: ignore
31 changes: 31 additions & 0 deletions .github/actions/testmo/testmo-finish/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: complete-testmo
description: "Completes testmo reports"
inputs:
testmoUrl:
description: "Testmo project URL"
required: true
testmoToken:
description: "Testmo token"
required: true
testmoRunId:
description: "Parallelized job Testmo run id"
required: true
runs:
using: composite
steps:
- name: Install dependencies
if: ${{ ! cancelled() }}
working-directory: .github/workflows
shell: bash
run: npm ci
- name: complete testmo report
working-directory: .github/workflows
shell: bash
run: |
npx testmo automation:run:complete \
--instance "$TESTMO_URL" \
--run-id "$TESTMO_RUN_ID"
env:
TESTMO_URL: ${{ inputs.testmoUrl }}
TESTMO_TOKEN: ${{ inputs.testmoToken }}
TESTMO_RUN_ID: ${{ inputs.testmoRunId }}
76 changes: 76 additions & 0 deletions .github/actions/testmo/testmo-threads-submit/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: submit-testmo
description: "Submits testmo resports"
inputs:
testmoUrl:
description: "Testmo project URL"
required: true
testmoToken:
description: "Testmo token"
required: true
testmoRunId:
description: "Parallelized job Testmo run id"
required: true
runs:
using: composite
steps:
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: npm
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-qa-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-qa-${{ env.cache-name }}-
${{ runner.os }}-qa-
${{ runner.os }}-
- name: Install Dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
shell: bash
run: NODE_OPTIONS=--max_old_space_size=4096 npm install
- name: Install dependencies
if: ${{ ! cancelled() }}
working-directory: .github/workflows
shell: bash
run: npm ci
- name: Testmo threads submit
if: github.event.pull_request.head.repo.fork == false && !cancelled()
working-directory: .github/workflows
shell: bash
run: |
npx testmo automation:run:submit-thread \
--instance "$TESTMO_URL" \
--run-id "$TESTMO_RUN_ID" \
--results ../../cypress/reports/junit/*.xml
env:
TESTMO_URL: ${{ inputs.testmoUrl }}
TESTMO_TOKEN: ${{ inputs.testmoToken }}
TESTMO_RUN_ID: ${{ inputs.testmoRunId}}
- name: Download reports artifacts
uses: actions/download-artifact@v3
with:
path: ./cypress/reports
- name: Create reports dir
continue-on-error: true
shell: bash
run: npm run qa:create-artifacts-dirs
- name: Merge report files
continue-on-error: true
shell: bash
run: npm run qa:generate-html-report
- name: Move artifacts screenshots into reports dir
continue-on-error: true
shell: bash
run: npm run qa:artifact-move-screenshots
- name: Upload reports
uses: actions/upload-artifact@v3
if: always()
with:
name: combined-report
path: ./cypress/reports
retention-days: 5
if-no-files-found: ignore
8 changes: 3 additions & 5 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ module.exports = defineConfig({
runMode: 1,
openMode: 0,
},
reporter: "junit",
screenshotsFolder: "cypress/reports/mochareports",
reporter: "cypress-multi-reporters",
reporterOptions: {
mochaFile: "results/test-output-[hash].xml",
jenkinsMode: true,
outputs: true,
testCaseSwitchClassnameAndName: true,
configFile: "reporter-config.json",
},
e2e: {
env: {
Expand Down
Loading

0 comments on commit b054bd9

Please sign in to comment.