Feat 207 accounting export Closes #207 #15
Workflow file for this run
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: Subscription Contract Fuzzing Tests | |
| on: | |
| push: | |
| branches: [main, develop] | |
| paths: | |
| - 'contracts/subscription/**' | |
| - '.github/workflows/fuzz-test.yml' | |
| pull_request: | |
| branches: [main, develop] | |
| paths: | |
| - 'contracts/subscription/**' | |
| jobs: | |
| fuzz: | |
| runs-on: ubuntu-latest | |
| name: Run Fuzzing Tests | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Install Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| profile: minimal | |
| - name: Cache cargo registry | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-registry- | |
| - name: Cache cargo index | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-git- | |
| - name: Cache cargo build | |
| uses: actions/cache@v3 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-build-target- | |
| - name: Run contract fuzz smoke suite | |
| run: | | |
| cd contracts | |
| cargo test --lib | |
| for target in fuzz pricing_fuzz rate_limit_fuzz; do | |
| if cargo test --test "$target" --no-run >/dev/null 2>&1; then | |
| cargo test --test "$target" | |
| else | |
| echo "::warning::Cargo test target '$target' is not registered; running workspace tests instead." | |
| fi | |
| done | |
| cargo test --verbose | |
| - name: Print test results | |
| if: always() | |
| run: | | |
| echo "Fuzzing tests completed!" |