feat(contract): removed panic error handling and added better error handling methods #74
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: Advanced Testing | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| jobs: | |
| comprehensive-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| targets: wasm32-unknown-unknown | |
| - name: Cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Unit Tests | |
| run: cargo test --lib --workspace | |
| - name: Integration Tests | |
| run: cargo test --test '*' --workspace | |
| - name: Benchmarks | |
| run: cargo bench --workspace --no-run | |
| security-scan: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Security Audit | |
| run: | | |
| cargo install cargo-audit | |
| cargo audit || true | |
| - name: Dependency Check | |
| run: cargo tree --duplicates || true | |
| coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install tarpaulin | |
| run: cargo install cargo-tarpaulin | |
| - name: Generate coverage | |
| run: cargo tarpaulin --workspace --out Xml --timeout 300 | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@v3 | |
| if: github.event_name == 'push' | |
| with: | |
| files: ./cobertura.xml | |
| fail_ci_if_error: false | |
| performance: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - name: Cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Run benchmarks | |
| run: cargo bench --workspace -- --output-format bencher | tee output.txt | |
| - name: Store benchmark result | |
| uses: benchmark-action/github-action-benchmark@v1 | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| with: | |
| tool: 'cargo' | |
| output-file-path: output.txt | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| auto-push: true |