Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cypress cloud to see videos of cypress runs on CI #401

Draft
wants to merge 10 commits into
base: develop_tchap
Choose a base branch
from
Draft
19 changes: 18 additions & 1 deletion .github/workflows/cypress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,28 @@ jobs:
browser: chrome
# headed: true # tchap uses headless, since we don't record videos.

command: "yarn test:cypress"
command: "yarn test:cypress:record"
record: true
# Note : 'working-directory' changes pwd, for everything. If you use it you need to change relative paths for everything, it's tricky.
env:
E2E_TEST_USER_EMAIL: ${{ secrets.E2E_TEST_USER_EMAIL }}
E2E_TEST_USER_PASSWORD: ${{ secrets.E2E_TEST_USER_PASSWORD }}
E2E_TEST_USER_SECURITY_KEY: ${{ secrets.E2E_TEST_USER_SECURITY_KEY }}
E2E_TEST_USER_HOMESERVER_URL: "https://matrix.agent1.tchap.incubateur.net"
E2E_TEST_USER_HOMESERVER_SHORT: "agent1.tchap.incubateur.net"
# pass GitHub token to allow accurately detecting a build vs a re-run build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# pass the Dashboard record key as an environment variable
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# pass the project ID
CYPRESS_PROJECT_ID: 'x8og2r'

- name: Upload Artifact
if: failure()
uses: actions/upload-artifact@v3
with:
name: cypress-results
path: |
cypress/screenshots
cypress/videos
cypress/synapselogs
2 changes: 1 addition & 1 deletion cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ getVar("E2E_TEST_USER_HOMESERVER_SHORT");
export default defineConfig({
watchForFileChanges: false,
videoUploadOnPasses: false,
projectId: "ppvnzg",
projectId: 'x8og2r',
experimentalInteractiveRunEvents: true,
defaultCommandTimeout: 10000,
chromeWebSecurity: false,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"test": "jest",
"test:cypress": "cypress run",
"test:cypress:open": "cypress open",
"test:cypress:record": "cypress run --record",
"coverage": "yarn test --coverage",
"analyse:unused-exports": "ts-node ./scripts/analyse_unused_exports.ts",
"postinstall": "./scripts/tchap/apply_patches.sh",
Expand Down
Loading