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

Commit 7bc5ea6

Browse files
authored
Merge branch 'develop' into AudioPlayer
2 parents 3df65ca + 765a715 commit 7bc5ea6

File tree

426 files changed

+19062
-14064
lines changed

Some content is hidden

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

426 files changed

+19062
-14064
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ 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
{

.github/codecov.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/element-build-and-test.yaml

Lines changed: 95 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,100 @@
33
# as an artifact and run integration tests.
44
name: Element Web - Build and Test
55
on:
6-
pull_request:
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 }}
715
jobs:
8-
build:
9-
runs-on: ubuntu-latest
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
1040
env:
11-
# This must be set for fetchdep.sh to get the right branch
12-
PR_NUMBER: ${{github.event.number}}
13-
steps:
14-
- uses: actions/checkout@v2
15-
- name: Build
16-
run: scripts/ci/layered.sh && cd element-web && cp element.io/develop/config.json config.json && CI_PACKAGE=true yarn build
17-
- name: Upload Artifact
18-
uses: actions/upload-artifact@v2
19-
with:
20-
name: previewbuild
21-
path: element-web/webapp
22-
# We'll only use this in a triggered job, then we're done with it
23-
retention-days: 1
24-
cypress:
25-
needs: build
26-
runs-on: ubuntu-latest
27-
steps:
28-
- uses: actions/checkout@v2
29-
- name: Download build
30-
uses: actions/download-artifact@v3
31-
with:
32-
name: previewbuild
33-
path: webapp
34-
- name: Run Cypress tests
35-
uses: cypress-io/github-action@v2
36-
with:
37-
# The built in Electron runner seems to grind to a halt trying
38-
# to run the tests, so use chrome.
39-
browser: chrome
40-
start: npx serve -p 8080 webapp
41-
- name: Upload Artifact
42-
if: failure()
43-
uses: actions/upload-artifact@v2
44-
with:
45-
name: cypress-results
46-
path: |
47-
cypress/screenshots
48-
cypress/videos
49-
cypress/synapselogs
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"
Lines changed: 56 additions & 44 deletions
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' }}

0 commit comments

Comments
 (0)