Offchain crate init #23
Workflow file for this run
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: ci | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test-and-lint: | |
name: test and lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
components: clippy, rustfmt | |
override: true | |
toolchain: stable | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: fmt | |
run: cargo fmt --all -- --check --color always | |
- name: clippy | |
uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-features | |
- name: test | |
run: cargo test | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
cargo: | |
- '**/Cargo.lock' | |
- '**/Cargo.toml' | |
# Only run if there are changes to Cargo.toml or Cargo.lock | |
- if: steps.filter.outputs.cargo == 'true' | |
name: cargo-deny | |
uses: EmbarkStudios/cargo-deny-action@v1 | |
with: | |
command: check bans licenses sources |