Skip to content

Commit

Permalink
Merge branch 'develop' into gsouquet/read-receipts-23191
Browse files Browse the repository at this point in the history
  • Loading branch information
Germain Souquet committed Sep 14, 2022
2 parents 3134d4e + eace4d6 commit e871faf
Show file tree
Hide file tree
Showing 101 changed files with 7,120 additions and 647 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/backport.yml
Expand Up @@ -25,6 +25,6 @@ jobs:
steps:
- uses: tibdex/backport@v2
with:
labels_template: "<%= JSON.stringify(labels) %>"
labels_template: "<%= JSON.stringify([...labels, 'X-Release-Blocker']) %>"
# We can't use GITHUB_TOKEN here or CI won't run on the new PR
github_token: ${{ secrets.ELEMENT_BOT_TOKEN }}
144 changes: 106 additions & 38 deletions .github/workflows/cypress.yaml
Expand Up @@ -6,19 +6,32 @@ on:
types:
- completed
jobs:
# This job cannot have a pretty name due to https://github.com/haya14busa/action-workflow_run-status/issues/158
cypress:
prepare:
name: Prepare
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
permissions:
actions: read
statuses: write
issues: read
statuses: write
pull-requests: read
environment: Cypress
outputs:
uuid: ${{ steps.uuid.outputs.value }}
pr_id: ${{ steps.prdetails.outputs.pr_id }}
commit_message: ${{ steps.commit.outputs.message }}
commit_author: ${{ steps.commit.outputs.author }}
commit_email: ${{ steps.commit.outputs.email }}
percy_enable: ${{ steps.percy.outputs.value || '1' }}
steps:
# Wire up the status check for this workflow_run action
- uses: haya14busa/action-workflow_run-status@967ed83efa565c257675ed70cfe5231f062ddd94 # v1.0.0
# We create the status here and then update it to success/failure in the `report` stage
# This provides an easy link to this workflow_run from the PR before Cypress is done.
- uses: Sibz/github-status-action@v1
with:
authToken: ${{ secrets.GITHUB_TOKEN }}
state: pending
context: ${{ github.workflow }} / cypress (${{ github.event.workflow_run.event }} => ${{ github.event_name }})
sha: ${{ github.event.workflow_run.head_sha }}
target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

- id: prdetails
if: github.event.workflow_run.event == 'pull_request'
Expand All @@ -27,6 +40,48 @@ jobs:
owner: ${{ github.event.workflow_run.head_repository.owner.login }}
branch: ${{ github.event.workflow_run.head_branch }}

- name: Get commit details
id: commit
if: github.event.workflow_run.event == 'pull_request'
uses: actions/github-script@v5
with:
script: |
const response = await github.rest.git.getCommit({
owner: context.repo.owner,
repo: context.repo.repo,
commit_sha: "${{ github.event.workflow_run.head_sha }}",
});
core.setOutput("message", response.data.message);
core.setOutput("author", response.data.author.name);
core.setOutput("email", response.data.author.email);
# Only run Percy when it is demanded or on develop
- name: Disable Percy if not needed
id: percy
if: |
github.event.workflow_run.event == 'pull_request' &&
!contains(fromJSON(steps.prdetails.outputs.data).labels.*.name, 'X-Needs-Percy')
run: echo "::set-output name=value::0"

- name: Generate unique ID 💎
id: uuid
run: echo "::set-output name=value::sha-$GITHUB_SHA-time-$(date +"%s")"

tests:
name: "Run Tests"
needs: prepare
runs-on: ubuntu-latest
permissions:
actions: read
issues: read
pull-requests: read
environment: Cypress
strategy:
fail-fast: false
matrix:
# Run 3 instances in Parallel
runner: [1, 2, 3]
steps:
- uses: actions/checkout@v2
with:
# XXX: We're checking out untrusted code in a secure context
Expand All @@ -46,28 +101,6 @@ jobs:
name: previewbuild
path: webapp

- name: Get commit details
if: github.event.workflow_run.event == 'pull_request'
uses: actions/github-script@v5
with:
script: |
const response = await github.rest.git.getCommit({
owner: context.repo.owner,
repo: context.repo.repo,
commit_sha: "${{ github.event.workflow_run.head_sha }}",
});
core.exportVariable("COMMIT_INFO_MESSAGE", response.data.message);
core.exportVariable("COMMIT_INFO_AUTHOR", response.data.author.name);
core.exportVariable("COMMIT_INFO_EMAIL", response.data.author.email);
# Only run Percy when it is demanded or on develop
- name: Disable Percy if not needed
if: |
github.event.workflow_run.event == 'pull_request' &&
!contains(fromJSON(steps.prdetails.outputs.data).labels.*.name, 'X-Needs-Percy')
run: |
echo "PERCY_ENABLE=0" >> $GITHUB_ENV
- name: Run Cypress tests
uses: cypress-io/github-action@v4.1.1
with:
Expand All @@ -77,28 +110,40 @@ jobs:
start: npx serve -p 8080 webapp
wait-on: 'http://localhost:8080'
record: true
command-prefix: 'yarn percy exec --'
parallel: true
command-prefix: 'yarn percy exec --parallel --'
ci-build-id: ${{ needs.prepare.outputs.uuid }}
env:
# pass the Dashboard record key as an environment variable
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}

# Use existing chromium rather than downloading another
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true

# pass GitHub token to allow accurately detecting a build vs a re-run build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# make Node's os.tmpdir() return something where we actually have permissions
TMPDIR: ${{ runner.temp }}

# tell Cypress more details about the context of this run
COMMIT_INFO_BRANCH: ${{ github.event.workflow_run.head_branch }}
COMMIT_INFO_SHA: ${{ github.event.workflow_run.head_sha }}
COMMIT_INFO_REMOTE: ${{ github.repositoryUrl }}
COMMIT_INFO_MESSAGE: ${{ needs.prepare.outputs.commit_message }}
COMMIT_INFO_AUTHOR: ${{ needs.prepare.outputs.commit_author }}
COMMIT_INFO_EMAIL: ${{ needs.prepare.outputs.commit_email }}

# pass the Percy token as an environment variable
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
# Use existing chromium rather than downloading another
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
PERCY_ENABLE: ${{ needs.prepare.outputs.percy_enable }}
PERCY_BROWSER_EXECUTABLE: /usr/bin/chromium-browser
# tell Percy more details about the context of this run
PERCY_BRANCH: ${{ github.event.workflow_run.head_branch }}
PERCY_COMMIT: ${{ github.event.workflow_run.head_sha }}
PERCY_PULL_REQUEST: ${{ steps.prdetails.outputs.pr_id }}
# pass GitHub token to allow accurately detecting a build vs a re-run build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# make Node's os.tmpdir() return something where we actually have permissions
TMPDIR: ${{ runner.temp }}
PERCY_PULL_REQUEST: ${{ needs.prepare.outputs.pr_id }}
PERCY_PARALLEL_TOTAL: ${{ strategy.job-total }}
PERCY_PARALLEL_NONCE: ${{ needs.prepare.outputs.uuid }}

- name: Upload Artifact
if: failure()
Expand All @@ -110,15 +155,35 @@ jobs:
cypress/videos
cypress/synapselogs
- run: mv cypress/performance/*.json cypress/performance/measurements-${{ strategy.job-index }}.json
continue-on-error: true

- name: Upload Benchmark
uses: actions/upload-artifact@v2
with:
name: cypress-benchmark
path: cypress/performance/measurements.json
path: cypress/performance/*
if-no-files-found: ignore
retention-days: 1

report:
name: Report results
needs: tests
runs-on: ubuntu-latest
if: always()
permissions:
statuses: write
steps:
- uses: Sibz/github-status-action@v1
with:
authToken: ${{ secrets.GITHUB_TOKEN }}
state: ${{ needs.tests.result == 'success' && 'success' || 'failure' }}
context: ${{ github.workflow }} / cypress (${{ github.event.workflow_run.event }} => ${{ github.event_name }})
sha: ${{ github.event.workflow_run.head_sha }}
target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

store-benchmark:
needs: cypress
needs: tests
runs-on: ubuntu-latest
if: |
github.event.workflow_run.event != 'pull_request' &&
Expand All @@ -134,6 +199,9 @@ jobs:
with:
name: cypress-benchmark

- name: Merge measurements
run: jq -s add measurements-*.json > measurements.json

- name: Store benchmark result
uses: matrix-org/github-action-benchmark@jsperfentry-6
with:
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,11 @@
name: Release Process
on:
release:
types: [ published ]
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
npm:
name: Publish
uses: matrix-org/matrix-js-sdk/.github/workflows/release-npm.yml@develop
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
20 changes: 20 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,23 @@
Changes in [3.54.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.54.0) (2022-09-13)
=====================================================================================================

## ✨ Features
* Device manager - hide unverified security recommendation when only current session is unverified ([\#9228](https://github.com/matrix-org/matrix-react-sdk/pull/9228)). Contributed by @kerryarchibald.
* Device manager - scroll to filtered list from security recommendations ([\#9227](https://github.com/matrix-org/matrix-react-sdk/pull/9227)). Contributed by @kerryarchibald.
* Device manager - updated dropdown style in filtered device list ([\#9226](https://github.com/matrix-org/matrix-react-sdk/pull/9226)). Contributed by @kerryarchibald.
* Device manager - device type and verification icons on device tile ([\#9197](https://github.com/matrix-org/matrix-react-sdk/pull/9197)). Contributed by @kerryarchibald.

## 🐛 Bug Fixes
* Description of DM room with more than two other people is now being displayed correctly ([\#9231](https://github.com/matrix-org/matrix-react-sdk/pull/9231)). Fixes vector-im/element-web#23094.
* Fix voice messages with multiple composers ([\#9208](https://github.com/matrix-org/matrix-react-sdk/pull/9208)). Fixes vector-im/element-web#23023. Contributed by @grimhilt.
* Fix suggested rooms going missing ([\#9236](https://github.com/matrix-org/matrix-react-sdk/pull/9236)). Fixes vector-im/element-web#23190.
* Fix tooltip infinitely recursing ([\#9235](https://github.com/matrix-org/matrix-react-sdk/pull/9235)). Fixes matrix-org/element-web-rageshakes#15107, matrix-org/element-web-rageshakes#15093 matrix-org/element-web-rageshakes#15092 and matrix-org/element-web-rageshakes#15077.
* Fix plain text export saving ([\#9230](https://github.com/matrix-org/matrix-react-sdk/pull/9230)). Contributed by @jryans.
* Add missing space in SecurityRoomSettingsTab ([\#9222](https://github.com/matrix-org/matrix-react-sdk/pull/9222)). Contributed by @gefgu.
* Make use of js-sdk roomNameGenerator to handle i18n for generated room names ([\#9209](https://github.com/matrix-org/matrix-react-sdk/pull/9209)). Fixes vector-im/element-web#21369.
* Fix progress bar regression throughout the app ([\#9219](https://github.com/matrix-org/matrix-react-sdk/pull/9219)). Fixes vector-im/element-web#23121.
* Reuse empty string & space string logic for event types in devtools ([\#9218](https://github.com/matrix-org/matrix-react-sdk/pull/9218)). Fixes vector-im/element-web#23115.

Changes in [3.53.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.53.0) (2022-08-31)
=====================================================================================================

Expand Down

0 comments on commit e871faf

Please sign in to comment.