fix: Fixes in release workflows (#23) #27
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: WASM CI | |
on: | |
pull_request: | |
push: | |
branches: [ main ] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Rust (stable) | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: wasm32-unknown-unknown | |
components: rustfmt, clippy | |
- name: Cache cargo registry | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
- name: Cache rustup toolchains | |
uses: actions/cache@v4 | |
with: | |
path: ~/.rustup | |
key: ${{ runner.os }}-rustup-${{ hashFiles('**/rust-toolchain.toml', '**/rust-toolchain') }} | |
- name: Cache target directory | |
uses: actions/cache@v4 | |
with: | |
path: | | |
target | |
confidence-resolver/target | |
confidence-cloudflare-resolver/target | |
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}-${{ github.job }} | |
- name: Install protoc | |
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
- name: Build | |
run: make build | |
- name: Test | |
run: make test | |
- name: rustfmt | |
run: cargo fmt --all --check | |
- name: clippy | |
run: make lint |