chore(deps): Bump dtolnay/rust-toolchain from efa25f7f19611383d5b0ccf2d1c8914531636bf9 to 3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 #336
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: Build and test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| gravity: | |
| name: Gravity tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Environment security | |
| - name: Step Security | |
| uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1 | |
| with: | |
| disable-sudo-and-containers: true | |
| egress-policy: block | |
| allowed-endpoints: > | |
| api.github.com:443 | |
| objects.githubusercontent.com:443 | |
| release-assets.githubusercontent.com:443 | |
| github.com:443 | |
| index.crates.io:443 | |
| static.crates.io:443 | |
| static.rust-lang.org:443 | |
| proxy.golang.org:443 | |
| # Checkout | |
| # Most toolchains require checkout first | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| # Language toolchains | |
| - name: Install Go | |
| uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 | |
| with: | |
| go-version: stable | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 | |
| with: | |
| # We start by installing the stable toolchain but the | |
| # `rust-toolchain.toml` file takes precendence | |
| toolchain: stable | |
| - name: Inspect toolchain versions | |
| run: | | |
| cargo -V | |
| go version | |
| # Workflow | |
| - name: cargo build | |
| run: cargo build --locked --verbose | |
| env: | |
| CARGO_TERM_COLOR: always | |
| - name: cargo test | |
| run: cargo test --locked --verbose | |
| env: | |
| CARGO_TERM_COLOR: always | |
| - name: go test | |
| run: | | |
| go generate ./... | |
| go test ./... | |
| - name: run snapshot tests | |
| run: cargo test --locked --verbose --test cli |