diff --git a/.editorconfig b/.editorconfig index 56631484c..98ebc4dc8 100644 --- a/.editorconfig +++ b/.editorconfig @@ -23,4 +23,4 @@ indent_size = 4 trim_trailing_whitespace = true [*.{yml,yaml}] -indent_size = 2 +indent_size = 4 diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 4fc47ed39..3b0e55451 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -2,13 +2,9 @@ name: Pull Request on: pull_request_target: types: [opened, edited, labeled, unlabeled, synchronize] + merge_group: + types: [checks_requested] workflow_call: - inputs: - labels: - type: string - default: "T-Defect,T-Deprecation,T-Enhancement,T-Task" - required: false - description: "No longer used, uses allchange logic now, will be removed at a later date" secrets: ELEMENT_BOT_TOKEN: required: true @@ -19,6 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: matrix-org/allchange@main + if: github.event_name != 'merge_group' with: ghToken: ${{ secrets.GITHUB_TOKEN }} requireLabel: true diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml index c66451559..62681ff07 100644 --- a/.github/workflows/static_analysis.yml +++ b/.github/workflows/static_analysis.yml @@ -1,6 +1,8 @@ name: Static Analysis on: pull_request: {} + merge_group: + types: [checks_requested] push: branches: [develop, master] concurrency: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 160984932..0093c6791 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,6 +1,8 @@ name: Tests on: pull_request: {} + merge_group: + types: [checks_requested] push: branches: [develop, master] concurrency: @@ -36,18 +38,19 @@ jobs: id: cpu-cores uses: SimenB/github-actions-cpu-cores@v1 - - name: Run tests with coverage and metrics + - name: Load metrics reporter + id: metrics if: github.ref == 'refs/heads/develop' run: | - yarn coverage --ci --reporters github-actions '--reporters=/spec/slowReporter.js' --max-workers ${{ steps.cpu-cores.outputs.count }} ./spec/${{ matrix.specs }} - mv coverage/lcov.info coverage/${{ matrix.node }}-${{ matrix.specs }}.lcov.info - env: - JEST_SONAR_UNIQUE_OUTPUT_NAME: true + echo "extra-reporter='--reporters=/spec/slowReporter.js'" >> $GITHUB_OUTPUT - - name: Run tests with coverage - if: github.ref != 'refs/heads/develop' + - name: Run tests run: | - yarn coverage --ci --reporters github-actions --max-workers ${{ steps.cpu-cores.outputs.count }} ./spec/${{ matrix.specs }} + yarn coverage \ + --ci \ + --reporters github-actions ${{ steps.metrics.outputs.extra-reporter }} \ + --max-workers ${{ steps.cpu-cores.outputs.count }} \ + ./spec/${{ matrix.specs }} mv coverage/lcov.info coverage/${{ matrix.node }}-${{ matrix.specs }}.lcov.info env: JEST_SONAR_UNIQUE_OUTPUT_NAME: true @@ -59,3 +62,22 @@ jobs: path: | coverage !coverage/lcov-report + + matrix-react-sdk: + name: Downstream test matrix-react-sdk + if: github.event_name == 'merge_group' + uses: matrix-org/matrix-react-sdk/.github/workflows/tests.yml@develop + with: + disable_coverage: true + matrix-js-sdk-sha: ${{ github.sha }} + + # Hook for branch protection to work outside merge queues + downstream: + name: Downstream tests + runs-on: ubuntu-latest + if: always() + needs: + - matrix-react-sdk + steps: + - if: needs.matrix-react-sdk.result != 'skipped' && needs.matrix-react-sdk.result != 'success' + run: exit 1