Revert "Include cypress tests in previewbuild bundle (#10705)"
This reverts commit d791649ad3
.
This commit is contained in:
parent
d791649ad3
commit
7f32b423c5
2 changed files with 28 additions and 13 deletions
31
.github/workflows/cypress.yaml
vendored
31
.github/workflows/cypress.yaml
vendored
|
@ -113,6 +113,26 @@ jobs:
|
||||||
with:
|
with:
|
||||||
run_id: ${{ github.event.workflow_run.id }}
|
run_id: ${{ github.event.workflow_run.id }}
|
||||||
name: previewbuild
|
name: previewbuild
|
||||||
|
path: webapp
|
||||||
|
|
||||||
|
# The workflow_run.head_sha is the sha of the head commit but the element-web was built using a simulated
|
||||||
|
# merge commit - https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
|
||||||
|
# so use the sha from the tarball for the checkout of the cypress tests
|
||||||
|
# to make sure we get a matching set of code and tests.
|
||||||
|
- name: Grab sha from webapp
|
||||||
|
id: sha
|
||||||
|
run: |
|
||||||
|
echo "sha=$(cat webapp/sha)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
# XXX: We're checking out untrusted code in a secure context
|
||||||
|
# We need to be careful to not trust anything this code outputs/may do
|
||||||
|
# We need to check this out to access the cypress tests which are on the head branch
|
||||||
|
repository: ${{ github.event.workflow_run.head_repository.full_name }}
|
||||||
|
ref: ${{ steps.sha.outputs.sha }}
|
||||||
|
persist-credentials: false
|
||||||
|
path: matrix-react-sdk
|
||||||
|
|
||||||
# This is necessary as Cypress relies on eval for passing functions between processes
|
# This is necessary as Cypress relies on eval for passing functions between processes
|
||||||
- name: Allow CSP script-src unsafe-eval
|
- name: Allow CSP script-src unsafe-eval
|
||||||
|
@ -121,10 +141,11 @@ jobs:
|
||||||
- name: Run Cypress tests
|
- name: Run Cypress tests
|
||||||
uses: cypress-io/github-action@59c3b9b4a1a6e623c29806797d849845443487d1
|
uses: cypress-io/github-action@59c3b9b4a1a6e623c29806797d849845443487d1
|
||||||
with:
|
with:
|
||||||
|
working-directory: matrix-react-sdk
|
||||||
# The built-in Electron runner seems to grind to a halt trying
|
# The built-in Electron runner seems to grind to a halt trying
|
||||||
# to run the tests, so use chrome.
|
# to run the tests, so use chrome.
|
||||||
browser: "${{ env.BROWSER_PATH }}"
|
browser: "${{ env.BROWSER_PATH }}"
|
||||||
start: npx serve -p 8080 webapp
|
start: npx serve -p 8080 ../webapp
|
||||||
wait-on: "http://localhost:8080"
|
wait-on: "http://localhost:8080"
|
||||||
record: true
|
record: true
|
||||||
parallel: true
|
parallel: true
|
||||||
|
@ -172,16 +193,16 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: cypress-results
|
name: cypress-results
|
||||||
path: |
|
path: |
|
||||||
cypress/screenshots
|
matrix-react-sdk/cypress/screenshots
|
||||||
cypress/videos
|
matrix-react-sdk/cypress/videos
|
||||||
cypress/synapselogs
|
matrix-react-sdk/cypress/synapselogs
|
||||||
|
|
||||||
- name: Upload reports
|
- name: Upload reports
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: cypress-junit
|
name: cypress-junit
|
||||||
path: cypress/results
|
path: matrix-react-sdk/cypress/results
|
||||||
|
|
||||||
report:
|
report:
|
||||||
name: Report results
|
name: Report results
|
||||||
|
|
10
.github/workflows/element-web.yaml
vendored
10
.github/workflows/element-web.yaml
vendored
|
@ -51,19 +51,13 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
yarn build
|
yarn build
|
||||||
echo $VERSION > webapp/version
|
echo $VERSION > webapp/version
|
||||||
mv webapp ..
|
echo $GITHUB_SHA > webapp/sha
|
||||||
working-directory: ./element-web
|
working-directory: ./element-web
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: previewbuild
|
name: previewbuild
|
||||||
path: |
|
path: element-web/webapp
|
||||||
webapp
|
|
||||||
cypress
|
|
||||||
cypress.config.ts
|
|
||||||
package.json
|
|
||||||
yarn.lock
|
|
||||||
.percy.yml
|
|
||||||
# We'll only use this in a triggered job, then we're done with it
|
# We'll only use this in a triggered job, then we're done with it
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue