Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 1eb6704

Browse files
authored
Add some doc to the github actions / CI scripts (#8034)
* Add some doc to the githuib actions / CI scripts Type: task * alalytics-events is more name matching
1 parent 20d5798 commit 1eb6704

File tree

8 files changed

+23
-3
lines changed

8 files changed

+23
-3
lines changed

.github/workflows/develop.yml renamed to .github/workflows/end-to-end-tests.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Develop
1+
name: End-to-end Tests
22
on:
33
# These tests won't work for non-develop branches at the moment as they
44
# won't pull in the right versions of other repos, so they're only enabled
@@ -11,6 +11,7 @@ jobs:
1111
end-to-end:
1212
runs-on: ubuntu-latest
1313
env:
14+
# This must be set for fetchdep.sh to get the right branch
1415
PR_NUMBER: ${{github.event.number}}
1516
container: vectorim/element-web-ci-e2etests-env:latest
1617
steps:

.github/workflows/layered-build.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
# Produce a 'layered build' (a build of element-web with this version of
2+
# react-sdk) and output it as an artifact
13
name: Layered Preview Build
24
on:
35
pull_request:
46
jobs:
57
build:
68
runs-on: ubuntu-latest
79
env:
10+
# This must be set for fetchdep.sh to get the right branch
811
PR_NUMBER: ${{github.event.number}}
912
steps:
1013
- uses: actions/checkout@v2

.github/workflows/netlify.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Triggers after the layered build has finished, taking the artifact
2+
# and uploading it to netlify
13
name: Upload Preview Build to Netlify
24
on:
35
workflow_run:

.github/workflows/test_coverage.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ jobs:
77
test-coverage:
88
runs-on: ubuntu-latest
99
env:
10+
# This must be set for fetchdep.sh to get the right branch
1011
PR_NUMBER: ${{github.event.number}}
1112
steps:
1213
- name: Checkout code

.github/workflows/typecheck.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88
env:
9+
# This must be set for fetchdep.sh to get the right branch
910
PR_NUMBER: ${{github.event.number}}
1011
steps:
1112
- uses: actions/checkout@v2

scripts/ci/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Docker file for end-to-end tests
2+
13
# Update on docker hub with the following commands in the directory of this file:
24
# If you're on linux amd64
35
# docker build -t vectorim/element-web-ci-e2etests-env:latest .

scripts/ci/install-deps.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/bin/bash
22

3+
# This installs other Matrix dependencies that are often
4+
# developed in parallel with react-sdk, using fetchdep.sh
5+
# for branch matching.
6+
# This will set up a working react-sdk environment, so is
7+
# used for running react-sdk standalone tests. To set up a
8+
# build of element-web, use layered.sh
9+
310
set -ex
411

512
scripts/fetchdep.sh matrix-org matrix-js-sdk

scripts/ci/layered.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#!/bin/bash
22

33
# Creates a layered environment with the full repo for the app and SDKs cloned
4-
# and linked.
4+
# and linked. This gives an element-web dev environment ready to build with
5+
# the current react-sdk branch and any matching branches of react-sdk's dependencies
6+
# so that changes can be tested in element-web.
57

68
# Note that this style is different from the recommended developer setup: this
79
# file nests js-sdk and element-web inside react-sdk, while the local
@@ -16,7 +18,8 @@ yarn link
1618
yarn install --pure-lockfile
1719
popd
1820

19-
# Set up the js-sdk first
21+
# Also set up matrix-analytics-events so we get the latest from
22+
# the main branch or a branch with matching name
2023
scripts/fetchdep.sh matrix-org matrix-analytics-events main
2124
pushd matrix-analytics-events
2225
yarn link

0 commit comments

Comments
 (0)