summary refs log tree commit diff
path: root/.github/workflows/tests.yml
blob: a5a4213e90bb7c78c0cd8f90a0ef6739c4109e2a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Tests

on:
  push:
    branches: ["develop", "release-*"]
  pull_request:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  # XXX When complement with workers is stable, move this back into the standard
  #     "complement" matrix above.
  #
  # See https://github.com/matrix-org/synapse/issues/13161
  complement-workers:
    if: "${{ !failure() && !cancelled() }}"
    runs-on: ubuntu-latest

    steps:
      - name: Run actions/checkout@v2 for synapse
        uses: actions/checkout@v2
        with:
          path: synapse

      - name: Prepare Complement's Prerequisites
        run: synapse/.ci/scripts/setup_complement_prerequisites.sh

      - run: |
          set -o pipefail
          synapse/scripts-dev/complement.sh --build-only
          while :; do
          POSTGRES=1 WORKERS=1 SYNAPSE_TEST_LOG_LEVEL=DEBUG COMPLEMENT_DIR=`pwd`/complement synapse/scripts-dev/complement.sh -f -json 2>&1 | gotestfmt | tee /tmp/xxx
          if grep "❌ TestWriteMDirectAccountData" /tmp/xxx; then
            break
          fi
          done
        shell: bash
        name: Run Complement Tests

  # a job which marks all the other jobs as complete, thus allowing PRs to be merged.
  tests-done:
    if: ${{ always() }}
    needs:
      - complement-workers
    runs-on: ubuntu-latest
    steps:
      - uses: matrix-org/done-action@v2
        with:
          needs: ${{ toJSON(needs) }}