|
| 1 | +name: Fault campaigns |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: "23 3 * * *" |
| 6 | + workflow_dispatch: |
| 7 | + release: |
| 8 | + types: [published] |
| 9 | + |
| 10 | +permissions: |
| 11 | + contents: read |
| 12 | + |
| 13 | +concurrency: |
| 14 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 15 | + cancel-in-progress: false |
| 16 | + |
| 17 | +defaults: |
| 18 | + run: |
| 19 | + shell: bash |
| 20 | + |
| 21 | +env: |
| 22 | + MIX_ENV: test |
| 23 | + ERL_FLAGS: "+S 4:4" |
| 24 | + GROUP_HISTORY_STEPS: "2000" |
| 25 | + GROUP_TEST_DIAGNOSTICS: ${{ github.workspace }}/_build/test-diagnostics |
| 26 | + ERL_CRASH_DUMP: ${{ github.workspace }}/_build/test-diagnostics/erl_crash.dump |
| 27 | + |
| 28 | +jobs: |
| 29 | + histories-and-faults: |
| 30 | + name: Seed ${{ matrix.seed }} / ${{ matrix.schedulers }} peer schedulers |
| 31 | + runs-on: ubuntu-24.04 |
| 32 | + timeout-minutes: 30 |
| 33 | + strategy: |
| 34 | + fail-fast: false |
| 35 | + matrix: |
| 36 | + seed: [104729, 130363, 155921] |
| 37 | + schedulers: ["1", "2", "4"] |
| 38 | + env: |
| 39 | + GROUP_PEER_SCHEDULERS: ${{ matrix.schedulers }} |
| 40 | + CAMPAIGN_SEED: ${{ matrix.seed }} |
| 41 | + steps: |
| 42 | + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 43 | + with: |
| 44 | + persist-credentials: false |
| 45 | + - uses: erlef/setup-beam@54075bcc5e249e4758d363f27d099f55d843f124 # v1.24.1 |
| 46 | + with: |
| 47 | + elixir-version: "> 0" |
| 48 | + otp-version: "> 0" |
| 49 | + - uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1 |
| 50 | + with: |
| 51 | + distribution: temurin |
| 52 | + java-version: "21" |
| 53 | + - run: mix deps.get |
| 54 | + - name: Repeat histories, partitions, churn, restarts and race regressions |
| 55 | + run: | |
| 56 | + mkdir -p "$GROUP_TEST_DIAGNOSTICS" |
| 57 | + mix compile --warnings-as-errors |
| 58 | + for iteration in 0 1 2 3 4; do |
| 59 | + seed=$((CAMPAIGN_SEED + iteration)) |
| 60 | + mix test --warnings-as-errors --seed "$seed" 2>&1 | |
| 61 | + tee "$GROUP_TEST_DIAGNOSTICS/run-$seed.log" |
| 62 | + done |
| 63 | + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| 64 | + if: always() |
| 65 | + with: |
| 66 | + name: campaign-${{ matrix.seed }}-${{ matrix.schedulers }} |
| 67 | + path: _build/test-diagnostics |
| 68 | + retention-days: 14 |
| 69 | + |
| 70 | + qualification: |
| 71 | + name: Protocol mutations and live checker qualification |
| 72 | + runs-on: ubuntu-24.04 |
| 73 | + timeout-minutes: 90 |
| 74 | + env: |
| 75 | + GROUP_HISTORY_STEPS: "100" |
| 76 | + GROUP_PEER_SCHEDULERS: "2" |
| 77 | + steps: |
| 78 | + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 79 | + with: |
| 80 | + persist-credentials: false |
| 81 | + - uses: erlef/setup-beam@54075bcc5e249e4758d363f27d099f55d843f124 # v1.24.1 |
| 82 | + with: |
| 83 | + elixir-version: "> 0" |
| 84 | + otp-version: "> 0" |
| 85 | + - uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1 |
| 86 | + with: |
| 87 | + distribution: temurin |
| 88 | + java-version: "21" |
| 89 | + - run: mix deps.get |
| 90 | + - name: Run the upstream PR gate before qualification |
| 91 | + run: | |
| 92 | + mkdir -p "$GROUP_TEST_DIAGNOSTICS" |
| 93 | + mix test --warnings-as-errors 2>&1 | tee "$GROUP_TEST_DIAGNOSTICS/baseline.log" |
| 94 | + - name: Require protocol mutants and injected checker faults to be detected |
| 95 | + run: | |
| 96 | + GROUP_JEPSEN_SKIP_CHECKER=1 test/jepsen/qualify.sh 2>&1 | |
| 97 | + tee "$GROUP_TEST_DIAGNOSTICS/qualification.log" |
| 98 | + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| 99 | + if: always() |
| 100 | + with: |
| 101 | + name: qualification-reports |
| 102 | + path: | |
| 103 | + _build/test-diagnostics |
| 104 | + tmp/mutation/**/*.log |
| 105 | + test/jepsen/.cache/qualification.* |
| 106 | + test/jepsen/store |
| 107 | + include-hidden-files: true |
| 108 | + retention-days: 14 |
| 109 | + |
| 110 | + soak: |
| 111 | + name: Jepsen ${{ matrix.transport }} / ${{ matrix.scenario }} |
| 112 | + needs: qualification |
| 113 | + runs-on: ubuntu-24.04 |
| 114 | + timeout-minutes: 180 |
| 115 | + strategy: |
| 116 | + fail-fast: false |
| 117 | + matrix: |
| 118 | + transport: [distribution, tcp, chaos] |
| 119 | + scenario: [mixed, permanent] |
| 120 | + env: |
| 121 | + GROUP_JEPSEN_SKIP_CHECKER: "1" |
| 122 | + GROUP_JEPSEN_CAMPAIGN_TRANSPORT: ${{ matrix.transport }} |
| 123 | + GROUP_JEPSEN_CAMPAIGN_SCENARIO: ${{ matrix.scenario }} |
| 124 | + GROUP_JEPSEN_CAMPAIGN_ARTIFACT_DIR: ${{ github.workspace }}/_build/jepsen-campaign |
| 125 | + steps: |
| 126 | + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 127 | + with: |
| 128 | + persist-credentials: false |
| 129 | + - uses: erlef/setup-beam@54075bcc5e249e4758d363f27d099f55d843f124 # v1.24.1 |
| 130 | + with: |
| 131 | + elixir-version: "> 0" |
| 132 | + otp-version: "> 0" |
| 133 | + - uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1 |
| 134 | + with: |
| 135 | + distribution: temurin |
| 136 | + java-version: "21" |
| 137 | + - run: mix deps.get |
| 138 | + # Split the upstream six-profile gate across jobs without reducing its |
| 139 | + # default 20 five-minute histories per profile. |
| 140 | + - run: test/jepsen/campaign.sh |
| 141 | + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| 142 | + if: always() |
| 143 | + with: |
| 144 | + name: soak-${{ matrix.transport }}-${{ matrix.scenario }} |
| 145 | + path: | |
| 146 | + _build/jepsen-campaign |
| 147 | + test/jepsen/store |
| 148 | + retention-days: 14 |
0 commit comments