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

Commit c442aa2

Browse files
authored
Merge branch 'develop' into issue_#21634
2 parents 7750b6a + 765a715 commit c442aa2

File tree

539 files changed

+25953
-15087
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

539 files changed

+25953
-15087
lines changed

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ insert_final_newline = true
2121
indent_style = space
2222
indent_size = 4
2323
trim_trailing_whitespace = true
24+
25+
[*.{yml,yaml}]
26+
indent_size = 2

.eslintrc.js

+3
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,15 @@ module.exports = {
8686
"jsx-a11y/no-static-element-interactions": "off",
8787
"jsx-a11y/role-supports-aria-props": "off",
8888
"jsx-a11y/tabindex-no-positive": "off",
89+
90+
"matrix-org/require-copyright-header": "error",
8991
},
9092
overrides: [
9193
{
9294
files: [
9395
"src/**/*.{ts,tsx}",
9496
"test/**/*.{ts,tsx}",
97+
"cypress/**/*.ts",
9598
],
9699
extends: [
97100
"plugin:matrix-org/typescript",

.github/codecov.yml

-12
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Produce a build of element-web with this version of react-sdk
2+
# and any matching branches of element-web and js-sdk, output it
3+
# as an artifact and run integration tests.
4+
name: Element Web - Build and Test
5+
on:
6+
pull_request: { }
7+
push:
8+
branches: [ develop, master ]
9+
repository_dispatch:
10+
types: [ upstream-sdk-notify ]
11+
env:
12+
# These must be set for fetchdep.sh to get the right branch
13+
REPOSITORY: ${{ github.repository }}
14+
PR_NUMBER: ${{ github.event.pull_request.number }}
15+
jobs:
16+
build:
17+
name: "Build Element-Web"
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- uses: actions/setup-node@v3
23+
with:
24+
cache: 'yarn'
25+
26+
- name: Fetch layered build
27+
id: layered_build
28+
run: |
29+
scripts/ci/layered.sh
30+
JSSDK_SHA=$(git -C matrix-js-sdk rev-parse --short=12 HEAD)
31+
REACT_SHA=$(git rev-parse --short=12 HEAD)
32+
VECTOR_SHA=$(git -C element-web rev-parse --short=12 HEAD)
33+
echo "::set-output name=VERSION::$VECTOR_SHA-react-$REACT_SHA-js-$JSSDK_SHA"
34+
35+
- name: Copy config
36+
run: cp element.io/develop/config.json config.json
37+
working-directory: ./element-web
38+
39+
- name: Build
40+
env:
41+
CI_PACKAGE: true
42+
VERSION: "${{ steps.layered_build.outputs.VERSION }}"
43+
run: yarn build
44+
working-directory: ./element-web
45+
46+
- name: Upload Artifact
47+
uses: actions/upload-artifact@v2
48+
with:
49+
name: previewbuild
50+
path: element-web/webapp
51+
# We'll only use this in a triggered job, then we're done with it
52+
retention-days: 1
53+
54+
cypress:
55+
name: "Cypress End to End Tests"
56+
needs: build
57+
runs-on: ubuntu-latest
58+
steps:
59+
- uses: actions/checkout@v2
60+
61+
- name: Download build
62+
uses: actions/download-artifact@v3
63+
with:
64+
name: previewbuild
65+
path: webapp
66+
67+
- name: Run Cypress tests
68+
uses: cypress-io/github-action@v2
69+
with:
70+
# The built in Electron runner seems to grind to a halt trying
71+
# to run the tests, so use chrome.
72+
browser: chrome
73+
start: npx serve -p 8080 webapp
74+
record: true
75+
env:
76+
# pass the Dashboard record key as an environment variable
77+
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
78+
# pass GitHub token to allow accurately detecting a build vs a re-run build
79+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
81+
- name: Upload Artifact
82+
if: failure()
83+
uses: actions/upload-artifact@v2
84+
with:
85+
name: cypress-results
86+
path: |
87+
cypress/screenshots
88+
cypress/videos
89+
cypress/synapselogs
90+
91+
app-tests:
92+
name: Element Web Integration Tests
93+
runs-on: ubuntu-latest
94+
steps:
95+
- uses: actions/checkout@v2
96+
97+
- uses: actions/setup-node@v3
98+
with:
99+
cache: 'yarn'
100+
101+
- name: Run tests
102+
run: "./scripts/ci/app-tests.sh"
+56-44
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,59 @@
11
name: End-to-end Tests
22
on:
3-
# These tests won't work for non-develop branches at the moment as they
4-
# won't pull in the right versions of other repos, so they're only enabled
5-
# on develop.
6-
push:
7-
branches: [develop]
8-
pull_request:
9-
branches: [develop]
3+
# These tests won't work for non-develop branches at the moment as they
4+
# won't pull in the right versions of other repos, so they're only enabled
5+
# on develop.
6+
push:
7+
branches: [ develop ]
8+
pull_request:
9+
branches: [ develop ]
10+
repository_dispatch:
11+
types: [ upstream-sdk-notify ]
12+
env:
13+
# These must be set for fetchdep.sh to get the right branch
14+
REPOSITORY: ${{ github.repository }}
15+
PR_NUMBER: ${{ github.event.pull_request.number }}
1016
jobs:
11-
end-to-end:
12-
runs-on: ubuntu-latest
13-
env:
14-
# This must be set for fetchdep.sh to get the right branch
15-
PR_NUMBER: ${{github.event.number}}
16-
container: vectorim/element-web-ci-e2etests-env:latest
17-
steps:
18-
- name: Checkout code
19-
uses: actions/checkout@v2
20-
- name: Prepare End-to-End tests
21-
run: ./scripts/ci/prepare-end-to-end-tests.sh
22-
- name: Run End-to-End tests
23-
run: ./scripts/ci/run-end-to-end-tests.sh
24-
- name: Archive logs
25-
uses: actions/upload-artifact@v2
26-
if: ${{ always() }}
27-
with:
28-
path: |
29-
test/end-to-end-tests/logs/**/*
30-
test/end-to-end-tests/synapse/installations/consent/homeserver.log
31-
retention-days: 14
32-
- name: Download previous benchmark data
33-
uses: actions/cache@v1
34-
with:
35-
path: ./cache
36-
key: ${{ runner.os }}-benchmark
37-
- name: Store benchmark result
38-
uses: matrix-org/github-action-benchmark@jsperfentry-1
39-
with:
40-
tool: 'jsperformanceentry'
41-
output-file-path: test/end-to-end-tests/performance-entries.json
42-
fail-on-alert: false
43-
comment-on-alert: false
44-
# Only temporary to monitor where failures occur
45-
alert-comment-cc-users: '@gsouquet'
46-
github-token: ${{ secrets.DEPLOY_GH_PAGES }}
47-
auto-push: ${{ github.ref == 'refs/heads/develop' }}
17+
end-to-end:
18+
runs-on: ubuntu-latest
19+
container: vectorim/element-web-ci-e2etests-env:latest
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v2
23+
24+
- uses: actions/setup-node@v3
25+
with:
26+
cache: 'yarn'
27+
28+
- name: Prepare End-to-End tests
29+
run: ./scripts/ci/prepare-end-to-end-tests.sh
30+
31+
- name: Run End-to-End tests
32+
run: ./scripts/ci/run-end-to-end-tests.sh
33+
34+
- name: Archive logs
35+
uses: actions/upload-artifact@v2
36+
if: ${{ always() }}
37+
with:
38+
path: |
39+
test/end-to-end-tests/logs/**/*
40+
test/end-to-end-tests/synapse/installations/consent/homeserver.log
41+
retention-days: 14
42+
43+
- name: Download previous benchmark data
44+
uses: actions/cache@v1
45+
with:
46+
path: ./cache
47+
key: ${{ runner.os }}-benchmark
48+
49+
- name: Store benchmark result
50+
uses: matrix-org/github-action-benchmark@jsperfentry-1
51+
with:
52+
tool: 'jsperformanceentry'
53+
output-file-path: test/end-to-end-tests/performance-entries.json
54+
fail-on-alert: false
55+
comment-on-alert: false
56+
# Only temporary to monitor where failures occur
57+
alert-comment-cc-users: '@gsouquet'
58+
github-token: ${{ secrets.DEPLOY_GH_PAGES }}
59+
auto-push: ${{ github.ref == 'refs/heads/develop' }}

.github/workflows/layered-build.yaml

-23
This file was deleted.

0 commit comments

Comments
 (0)