Skip to content

Commit 7ee9e41

Browse files
authored
Schedule tests which are known to pass under NoThunks nightly, and the rest monthly (#1180)
# Description - Adds a monthly scheduled build as well as the existing nightly scheduled build - Adds a new matrix variable `test-set` which determines which set of tests to actually run - at the moment, this is either all tests (`all`) or the test suites which are known to pass under NoThunks (`no-thunks-safe`) - Adds a new workflow input `nothunks-safe-only` which causes a manually-dispatched workflow to use the `no-thunks-safe` test set - Adds a new `cabal test` step which runs the set of NoThunks-safe tests if `no-thunks-safe` is enabled - Changes the existing `cabal test all` step to only run if `test-set == 'all'`
2 parents 0f4c374 + bb19cf0 commit 7ee9e41

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,24 @@ on:
1313
Run the test run under NoThunks conditions instead of the default variant
1414
type: boolean
1515
default: false
16+
nothunks-safe-only:
17+
description:
18+
Run only the test suites which are known to pass under NoThunks conditions
19+
type: boolean
20+
default: false
1621
pull_request:
1722
merge_group:
1823
push:
1924
branches:
2025
- main
2126
schedule:
27+
2228
# every night, at midnight
2329
- cron: "0 0 * * *"
2430

31+
# on the first day of each month, at midnight
32+
- cron: "0 0 1 * *"
33+
2534
jobs:
2635
build-test-bench-haddocks:
2736
name: Build and test
@@ -31,9 +40,12 @@ jobs:
3140
matrix:
3241
ghc: ["8.10.7", "9.6.6", "9.8.2"]
3342
variant: [default, no-thunks]
43+
test-set: [all, no-thunks-safe]
3444
exclude:
3545
- variant:
3646
${{ (github.event_name == 'schedule' || inputs.nothunks) && 'default' || 'no-thunks' }}
47+
- test-set:
48+
${{ (github.event_name == 'schedule' || inputs.nothunks-safe-only) && 'all' || 'no-thunks-safe' }}
3749
env:
3850
# Modify this value to "invalidate" the Cabal cache.
3951
CABAL_CACHE_VERSION: "2024-07-04"
@@ -127,8 +139,13 @@ jobs:
127139
run: cabal build all -j
128140

129141
- name: Test
142+
if: matrix.test-set == 'all'
130143
run: cabal test all -j --test-show-details=streaming
131144

145+
- name: Test (NoThunks-safe tests only)
146+
if: matrix.test-set == 'no-thunks-safe'
147+
run: cabal test ouroboros-consensus:consensus-test ouroboros-consensus:doctest ouroboros-consensus:infra-test ouroboros-consensus:storage-test ouroboros-consensus-cardano:byron-test ouroboros-consensus-cardano:shelley-test ouroboros-consensus-diffusion:infra-test ouroboros-consensus-diffusion:mock-test ouroboros-consensus-protocol:protocol-test -j --test-show-details=streaming
148+
132149
- name: Create baseline-benchmark
133150
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
134151
run: |

0 commit comments

Comments
 (0)