Skip to content

Commit 5b6c9ef

Browse files
alaahongCopilot
andauthored
feat: add daily fuzz testing workflow for main module (#560)
* feat: add daily fuzz testing workflow for main module * Update .github/workflows/fuzz-tests.yml Co-authored-by: Copilot <[email protected]> * Update .github/workflows/fuzz-tests.yml Co-authored-by: Copilot <[email protected]> * Update .github/workflows/fuzz-tests.yml Co-authored-by: Copilot <[email protected]> * Update .github/workflows/fuzz-tests.yml Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent cadda72 commit 5b6c9ef

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/fuzz-tests.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Fuzz Tests (daily)
2+
3+
on:
4+
schedule:
5+
- cron: '0 16 * * *' # Runs daily at 00:00 GMT+8
6+
workflow_dispatch:
7+
8+
jobs:
9+
fuzz:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 360
12+
env:
13+
# Enable Jazzer JUnit mode for fuzz testing, avoiding complex binary target command line configuration
14+
JAZZER_FUZZ: '1'
15+
# Write crash/reproduction artifacts to temp directory for upload; -max_total_time unit is seconds
16+
JAZZER_ARGS: "-artifact_prefix=${{ runner.temp }}/jazzer-artifacts/ -max_total_time=300 -rss_limit_mb=2048"
17+
MAVEN_OPTS: '-Xmx2g -Xms2g -Dfile.encoding=UTF-8'
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Set up JDK 17
23+
uses: actions/setup-java@v4
24+
with:
25+
distribution: 'temurin'
26+
java-version: '17'
27+
cache: 'maven'
28+
29+
- name: Run fuzz tests (fastexcel module)
30+
shell: bash
31+
run: |
32+
mkdir -p "${{ runner.temp }}/jazzer-artifacts/"
33+
# Execute only tests under fuzz package and force tests not to be skipped
34+
mvn -B -pl fastexcel -am -D"maven.test.skip=false" -DtrimStackTrace=false -D"test=cn.idev.excel.fuzz.*Test" test
35+
36+
- name: Upload Jazzer artifacts (crashes, repros)
37+
if: always()
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: jazzer-artifacts
41+
path: ${{ runner.temp }}/jazzer-artifacts/
42+
if-no-files-found: ignore
43+

0 commit comments

Comments
 (0)