Skip to content

Commit

Permalink
Iterate
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy committed Oct 15, 2024
1 parent 0f31b15 commit 0007d3d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 92 deletions.
20 changes: 4 additions & 16 deletions .github/workflows/end-to-end-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ on:
type: string
required: false
description: "The Git SHA of matrix-js-sdk to build against. By default, will use a matching branch name if it exists, or develop."
element-web-sha:
type: string
required: false
description: "The Git SHA of element-web to build against. By default, will use a matching branch name if it exists, or develop."

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
Expand Down Expand Up @@ -58,16 +54,14 @@ jobs:
env:
# tell layered.sh to check out the right sha of the JS-SDK & EW, if they were given one
JS_SDK_GITHUB_BASE_REF: ${{ inputs.matrix-js-sdk-sha }}
ELEMENT_WEB_GITHUB_BASE_REF: ${{ inputs.element-web-sha }}
run: |
scripts/ci/layered.sh
scripts/layered.sh
JSSDK_SHA=$(git -C matrix-js-sdk rev-parse --short=12 HEAD)
VECTOR_SHA=$(git rev-parse --short=12 HEAD)
echo "VERSION=$VECTOR_SHA--js-$JSSDK_SHA" >> $GITHUB_OUTPUT
- name: Copy config
run: cp element.io/develop/config.json config.json
working-directory: ./element-web

- name: Build
env:
Expand All @@ -76,13 +70,12 @@ jobs:
run: |
yarn build
echo $VERSION > webapp/version
working-directory: ./element-web
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: webapp
path: element-web/webapp
path: webapp
retention-days: 1

playwright:
Expand All @@ -103,7 +96,6 @@ jobs:
- uses: actions/checkout@v4
with:
persist-credentials: false
path: element-web
repository: element-hq/element-web

- name: 📥 Download artifact
Expand All @@ -115,16 +107,14 @@ jobs:
- uses: actions/setup-node@v4
with:
cache: "yarn"
cache-dependency-path: element-web/yarn.lock
cache-dependency-path: yarn.lock
node-version: "lts/*"

- name: Install dependencies
working-directory: element-web
run: yarn install --frozen-lockfile

- name: Get installed Playwright version
id: playwright
working-directory: element-web
run: echo "version=$(yarn list --pattern @playwright/test --depth=0 --json --non-interactive --no-progress | jq -r '.data.trees[].name')" >> $GITHUB_OUTPUT

- name: Cache playwright binaries
Expand All @@ -137,19 +127,17 @@ jobs:

- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
working-directory: element-web
run: yarn playwright install --with-deps

- name: Run Playwright tests
run: yarn playwright test --shard ${{ matrix.runner }}/${{ strategy.job-total }}
working-directory: element-web

- name: Upload blob report to GitHub Actions Artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: all-blob-reports-${{ matrix.runner }}
path: element-web/blob-report
path: blob-report
retention-days: 1

complete:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
cache: "yarn"

- name: Install Deps
run: "./scripts/ci/install-deps.sh"
run: "./scripts/layered.sh"
env:
JS_SDK_GITHUB_BASE_REF: ${{ inputs.matrix-js-sdk-sha }}

Expand Down
32 changes: 0 additions & 32 deletions scripts/ci/install-deps.sh

This file was deleted.

43 changes: 0 additions & 43 deletions scripts/ci/layered.sh

This file was deleted.

3 changes: 3 additions & 0 deletions scripts/layered.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export PR_REPO=element-web
# Set up the js-sdk first
scripts/fetchdep.sh matrix-org matrix-js-sdk develop
pushd matrix-js-sdk
[ -n "$JS_SDK_GITHUB_BASE_REF" ] && git fetch --depth 1 origin $JS_SDK_GITHUB_BASE_REF && git checkout $JS_SDK_GITHUB_BASE_REF
yarn link
yarn install --frozen-lockfile
popd
Expand All @@ -41,3 +42,5 @@ fi

# Link the layers into element-web
yarn link matrix-js-sdk
[ -d matrix-analytics-events ] && yarn link @matrix-org/analytics-events
yarn install --frozen-lockfile $@

0 comments on commit 0007d3d

Please sign in to comment.