LICENSE #5
This file contains 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: "Test" | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
workflow_dispatch: | |
# cancel previous runs | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 # v0.11.0 | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set rust version via common env file | |
run: cat .github/env >> $GITHUB_ENV | |
- name: Install stable toolchain | |
run: | | |
rustup install $RUST_STABLE_VERSION | |
rustup default $RUST_STABLE_VERSION | |
rustup target add wasm32-unknown-unknown | |
rustup component add rust-src | |
- name: Fetch cache | |
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 | |
with: | |
shared-key: "metadata-cache-tests" | |
- name: Test | |
run: cargo test --all --release -q | |
env: | |
RUSTFLAGS: "-C debug-assertions -D warnings" |