-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (59 loc) · 2.57 KB
/
Copy pathnightly-property-tests.yml
File metadata and controls
66 lines (59 loc) · 2.57 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Nightly Property Tests
# Runs the jqwik-based concurrent budget-exhaustion property test against
# a full reservation + Redis stack (Testcontainers). Excluded from PR CI
# because a single run takes several minutes; nightly gives us deep
# interleaving coverage without blocking PR feedback.
#
# Test: BudgetExhaustionConcurrentPropertyTest
# Invariants asserted:
# I1. sum(committed charged_amount) <= initial_budget under REJECT policy
# I2. No reservation in two terminal states simultaneously
# I3. Every reservation terminates within TTL + grace + sweep
#
# Failure triage: jqwik shrinks automatically. Surefire reports include
# the minimal (budget, threads, workload) triple that violates an invariant.
on:
schedule:
- cron: '0 6 * * *' # 06:00 UTC daily
workflow_dispatch: {} # manual trigger
permissions: read-all
jobs:
property-tests:
name: Property-based concurrent invariants
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up JDK 21
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: 21
cache: maven
# Testcontainers boots redis:7-alpine via Docker (preinstalled on ubuntu-latest).
# jqwik.tries.default=100 overrides the default of 20 from
# junit-platform.properties to give
# nightly 5x deeper interleaving coverage than a PR-feedback run.
# Use `mvn test` (not `verify`) because -Pproperty-tests restricts
# surefire to only the 5 property-tagged tests — running `verify` would
# trigger JaCoCo's 95% coverage check on a test subset that exercises
# almost no code paths, failing the build despite all property
# invariants passing. PR CI still enforces the full-suite coverage
# bar; this nightly is about invariant coverage over interleavings,
# not code-path coverage.
- name: Run property-based tests
run: >
mvn -B test
--file cycles-protocol-service/pom.xml
-Pproperty-tests
-Djqwik.tries.default=100
-Dsurefire.failIfNoSpecifiedTests=false
- name: Upload surefire reports on failure
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: surefire-reports-property-tests
path: cycles-protocol-service/cycles-protocol-service-api/target/surefire-reports/
retention-days: 14