I want to run Cypress tests on Git Hub action. The GH page is enabled and the workflow seems to be passed:
But when I click Actions I should see the workflows, instead, it shows "There are no workflows run yet:
These are the files/folders I pushed to Git Hub:
This is the package.json:
{
"name": "customer",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test:chrome": "cypress run --browser chrome",
"combine:report":"mochawesome-merge ./mochawesome-report/*.json -o index.json",
"generate:report": "merge index.json --reportDir public --assetsDir public/assets --reportPageTitle index.html"
},
"author": "ingridd",
"license": "ISC",
"devDependencies": {
"@testing-library/cypress": "^7.0.4",
"cypress": "^6.4.0",
"cypress-iframe": "^1.0.1",
"cypress-wait-until": "^1.7.1",
"mochawesome": "6.2.2",
"mochawesome-merge": "4.2.0",
"mochawesome-report-generator": "5.2.0"
},
"dependencies": {
"cypress-enter-plugin": "^1.0.1",
"cypress-get-table": "^1.0.1"
}
}
And the cypress.json:
{"pageLoadTimeout": 900000,
"includeShadowDom": true,
"modifyObstructiveCode":false,
"responseTimeout": 120000,
"chromeWebSecurity":false,
"numTestKeptInMemory":0,
"waitForAnimations": true,
"defaultCommandTimeout":100000,
"reporter": "mochawesome",
"reporterOptions":{
"overwrite":false,
"html":false,
"json":true
}
}
On the/.github/workflows I uploaded the cypress-report.yml
on:
push:
branches:
- 'master'
jobs:
cypress-test:
name: Run on Chrome 89
runs-on: ubuntu-18.04
container: cypress/browsers:node14.16.0-chrome89-ff86
steps:
- uses: actions/checkout@v2
- name: Install cypress and verify
run: |
npm ci
$(npm bin)/cypress verify
- name: Run Cypress tests
run: npm run test:chrome
continue-on-error: true
- name: Copy test execution videos and screenshots
run: |
mkdir public
cp -r cypress/videos public/videos
cp -r cypress/screenshots public/screenshots
- name: Merge test reports
run: npm run combine:report
- name: Generate HTML report
run: npm run generate:report
- name: Deploy report page to GitHub Page
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
Any help on how can I run the workflows is appreciated.