Merge pull request #382 from dreamgenies/fix/322-ipfs-validation #390
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: PetChain Stellar Contracts | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: read-all | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| target: wasm32-unknown-unknown | |
| - name: Build contracts | |
| run: | | |
| cd stellar-contracts | |
| cargo build --target wasm32-unknown-unknown --release | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| - name: Run tests | |
| run: | | |
| cd stellar-contracts | |
| cargo test | |
| - name: Generate coverage | |
| run: | | |
| cd stellar-contracts | |
| cargo install cargo-tarpaulin | |
| cargo tarpaulin --out xml | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| file: ./stellar-contracts/cobertura.xml | |
| security: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Security audit | |
| run: | | |
| cargo install cargo-audit | |
| cd stellar-contracts | |
| cargo audit |