Comprehensive Tests #43
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: Comprehensive Tests | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| schedule: | |
| # Run nightly tests at 2 AM UTC | |
| - cron: '0 2 * * *' | |
| env: | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| fast-tests: | |
| name: Fast Tests (Unit + Integration) | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| target: wasm32-unknown-unknown | |
| override: true | |
| - name: Cache cargo | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| contracts/token-factory/target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Run fast tests | |
| run: ./scripts/run-tests.sh -m fast | |
| full-tests: | |
| name: Full Tests (Unit + Integration + Property) | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| target: wasm32-unknown-unknown | |
| override: true | |
| - name: Cache cargo | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| contracts/token-factory/target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Run full test suite | |
| run: ./scripts/run-tests.sh -m full | |
| nightly-tests: | |
| name: Nightly Tests (Comprehensive) | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'schedule' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| target: wasm32-unknown-unknown | |
| override: true | |
| - name: Cache cargo | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| contracts/token-factory/target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Run nightly tests | |
| run: ./scripts/run-tests.sh -m nightly -v | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: nightly-test-results | |
| path: contracts/token-factory/target/debug/ | |
| retention-days: 7 | |
| test-summary: | |
| name: Test Summary | |
| runs-on: ubuntu-latest | |
| needs: [fast-tests, full-tests] | |
| if: always() | |
| steps: | |
| - name: Check test results | |
| run: | | |
| echo "## Test Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "✅ All test suites completed" >> $GITHUB_STEP_SUMMARY |