Fuzzing Tests #1192
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Fuzzing Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| schedule: | |
| # Run fuzzing tests daily at 2 AM UTC | |
| - cron: "0 2 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| fuzz: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| permissions: | |
| actions: read | |
| contents: read | |
| deployments: read | |
| packages: none | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci --legacy-peer-deps | |
| - name: Install webview dependencies | |
| run: | | |
| cd webview-ui | |
| npm ci --legacy-peer-deps | |
| cd .. | |
| - name: Build webview | |
| run: npm run build:webview | |
| - name: Compile TypeScript | |
| run: npm run test-compile | |
| - name: Run Fuzzing Tests | |
| run: npm run test:fuzz | |
| timeout-minutes: 10 | |
| - name: Upload fuzzing results | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: fuzzing-results-${{ matrix.node-version }} | |
| path: | | |
| test-results/ | |
| coverage/ | |
| retention-days: 30 | |
| # Extended fuzzing with more iterations (optional, runs less frequently) | |
| extended-fuzz: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| permissions: | |
| actions: read | |
| contents: read | |
| deployments: read | |
| packages: none | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 20.x | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install webview dependencies | |
| run: | | |
| cd webview-ui | |
| npm ci --legacy-peer-deps | |
| cd .. | |
| - name: Build webview | |
| run: npm run build:webview | |
| - name: Compile TypeScript | |
| run: npm run test-compile | |
| - name: Run Extended Fuzzing Tests (10x iterations) | |
| run: npm run test:fuzz | |
| timeout-minutes: 30 | |
| env: | |
| FUZZ_ITERATIONS: 10000 | |
| - name: Upload extended fuzzing results | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: extended-fuzzing-results | |
| path: | | |
| test-results/ | |
| coverage/ | |
| retention-days: 90 |