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

Commit b730321

Browse files
authored
Enable merge queues (#10515)
* Enable merge queues * Iterate * Iterate * iterate * Fix check blocked and others not running in MQ * Add concurrency * Iterate * Iterate * Iterate * Iterate * Update pr-details action
1 parent 7321277 commit b730321

File tree

4 files changed

+28
-2
lines changed

4 files changed

+28
-2
lines changed

.github/workflows/element-web.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
schedule:
77
- cron: "17 4 * * 1-5" # every weekday at 04:17 UTC
88
pull_request: {}
9+
merge_group:
10+
types: [checks_requested]
911
push:
1012
branches: [develop, master]
1113
repository_dispatch:

.github/workflows/pull_request.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Pull Request
22
on:
33
pull_request_target:
44
types: [opened, edited, labeled, unlabeled, synchronize]
5+
merge_group:
6+
types: [checks_requested]
57
jobs:
68
action:
79
uses: matrix-org/matrix-js-sdk/.github/workflows/pull_request.yaml@develop

.github/workflows/static_analysis.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Static Analysis
22
on:
33
pull_request: {}
4+
merge_group:
5+
types: [checks_requested]
46
push:
57
branches: [develop, master]
68
repository_dispatch:

.github/workflows/tests.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Tests
22
on:
33
pull_request: {}
4+
merge_group:
5+
types: [checks_requested]
46
push:
57
branches: [develop, master]
68
repository_dispatch:
@@ -19,6 +21,7 @@ concurrency:
1921
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
2022
cancel-in-progress: true
2123
env:
24+
ENABLE_COVERAGE: ${{ github.event_name != 'merge_group' && inputs.disable_coverage != 'true' }}
2225
# These must be set for fetchdep.sh to get the right branch
2326
REPOSITORY: ${{ github.repository }}
2427
PR_NUMBER: ${{ github.event.pull_request.number }}
@@ -60,21 +63,38 @@ jobs:
6063
6164
- name: Run tests
6265
run: |
63-
yarn ${{ inputs.disable_coverage != 'true' && 'coverage' || 'test' }} \
66+
yarn test \
67+
--coverage=${{ env.ENABLE_COVERAGE }} \
6468
--ci \
6569
--reporters github-actions ${{ steps.metrics.outputs.extra-reporter }} \
6670
--max-workers ${{ steps.cpu-cores.outputs.count }} \
6771
--cacheDirectory /tmp/jest_cache
6872
6973
- name: Upload Artifact
70-
if: inputs.disable_coverage != 'true'
74+
if: env.ENABLE_COVERAGE == 'true'
7175
uses: actions/upload-artifact@v3
7276
with:
7377
name: coverage
7478
path: |
7579
coverage
7680
!coverage/lcov-report
7781
82+
skip_sonar:
83+
name: Skip SonarCloud in merge queue
84+
if: github.event_name == 'merge_group' || inputs.disable_coverage == 'true'
85+
runs-on: ubuntu-latest
86+
needs: jest
87+
steps:
88+
- name: Skip SonarCloud
89+
uses: Sibz/github-status-action@faaa4d96fecf273bd762985e0e7f9f933c774918 # v1
90+
with:
91+
authToken: ${{ secrets.GITHUB_TOKEN }}
92+
state: success
93+
description: SonarCloud skipped
94+
context: SonarCloud Code Analysis
95+
sha: ${{ github.sha }}
96+
target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
97+
7898
app-tests:
7999
name: Element Web Integration Tests
80100
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)