Consolidate Build & Test CI (#32929)
* Consolidate Build & Test CI * Add missing workflow dependency * Fix artifact name clash * Fix playwright config * Fix playwright_ew job * Fix ed tests * Fix playwright tags * Iterate * Fix file reads * Fix sample-files paths * Fix PW_TAG * Fix blob report paths * Delint * Fix build-and-test.yaml * Iterate * Fix consentHomeserver.ts * Simplify * Iterate * Delint * Iterate * Iterate * Iterate * Specify shell * Simplify * Delete apps/web/playwright/sample-files/index.ts * Discard changes to apps/web/playwright/sample-files/index.ts * Exclude playwright-common from coverage gate * Attempt to speed up arm64 desktop test * Revert "Attempt to speed up arm64 desktop test" This reverts commit 8fa8ff0c785da6dad05bda938c8af24fa6af0451. * Iterate * Fix cache key * Accept python or python3 as per node-gyp * Accept python or python3 as per node-gypd * Exclude apps/desktop/hak from coverage gate
This commit is contained in:
committed by
GitHub
parent
cabac4ef0e
commit
2b3720b4a2
@@ -20,11 +20,10 @@ on:
|
||||
required: false
|
||||
default: false
|
||||
description: "Whether the build should be deployed to production"
|
||||
branch-matching:
|
||||
type: boolean
|
||||
webapp-artifact:
|
||||
type: string
|
||||
required: false
|
||||
default: false
|
||||
description: "Whether the branch name should be matched to find the element-web commit"
|
||||
description: "Name of the webapp artifact that should be used, will fetch a relevant build if omitted"
|
||||
secrets:
|
||||
# Required if `nightly` is set
|
||||
CF_R2_ACCESS_KEY_ID:
|
||||
@@ -66,28 +65,26 @@ jobs:
|
||||
|
||||
- name: Install Deps
|
||||
working-directory: apps/desktop
|
||||
run: "pnpm install --frozen-lockfile"
|
||||
run: "pnpm install --frozen-lockfile --filter element-desktop"
|
||||
|
||||
- name: Fetch Element Web (matching branch)
|
||||
id: branch-matching
|
||||
if: inputs.branch-matching
|
||||
- name: Fetch Element Web (from artifact)
|
||||
if: inputs.webapp-artifact != ''
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
|
||||
with:
|
||||
name: ${{ inputs.webapp-artifact }}
|
||||
path: apps/desktop/webapp
|
||||
|
||||
- name: Build webapp.asar (from artifact)
|
||||
if: inputs.webapp-artifact != ''
|
||||
working-directory: apps/desktop
|
||||
continue-on-error: true
|
||||
run: |
|
||||
scripts/branch-match.sh
|
||||
cp "$CONFIG_DIR/config.json" element-web/
|
||||
pnpm --cwd element-web install --frozen-lockfile
|
||||
pnpm --cwd element-web run build
|
||||
mv element-web/webapp .
|
||||
cp -f "$CONFIG_DIR/config.json" webapp/config.json
|
||||
pnpm run asar-webapp
|
||||
env:
|
||||
# These must be set for branch-match.sh to get the right branch
|
||||
REPOSITORY: ${{ github.repository }}
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
CONFIG_DIR: ${{ inputs.config }}
|
||||
|
||||
- name: Fetch Element Web (${{ inputs.version }})
|
||||
if: steps.branch-matching.outcome == 'failure' || steps.branch-matching.outcome == 'skipped'
|
||||
if: inputs.webapp-artifact == ''
|
||||
working-directory: apps/desktop
|
||||
run: pnpm run fetch --noverify -d ${CONFIG} ${VERSION}
|
||||
env:
|
||||
@@ -189,7 +186,7 @@ jobs:
|
||||
|
||||
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
|
||||
with:
|
||||
name: webapp
|
||||
name: desktop-prepare
|
||||
retention-days: 1
|
||||
path: |
|
||||
apps/desktop/webapp.asar
|
||||
|
||||
Reference in New Issue
Block a user