bugfix: fix integ tests #108
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: Code Coverage Push | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| runs-on: blacksmith-16vcpu-ubuntu-2204 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Caching Rust Dependencies | |
| uses: useblacksmith/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/bin | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - run: rustup update 1.87 | |
| - run: rustup default 1.87 | |
| - run: cargo install cargo-tarpaulin --force | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y protobuf-compiler libclang-dev clang | |
| - name: Run Code Coverage | |
| run: | | |
| cargo tarpaulin --all-targets --exclude-files "target/*" --count --out Json | |
| mv ./tarpaulin-report.json target/tarpaulin/coverage.json | |
| env: | |
| MNEMONIC: ${{ secrets.TEST_MNEMONIC }} | |
| MNEMONIC_TO: ${{ secrets.TEST_MNEMONIC_TO }} | |
| IS_TESTNET: "true" | |
| - name: Show coverage report for debugging | |
| if: always() | |
| run: cat target/tarpaulin/coverage.json | |
| - name: Generate Coverage Badge | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| run: | | |
| pip install anybadge | |
| python workflows/update_coverage.py | |
| - name: Deploy badge to gh-pages | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: gh-pages | |
| publish_dir: ./badges_output | |
| keep_files: true |