Skip to content

Refactor/update anchor version #97

Refactor/update anchor version

Refactor/update anchor version #97

Workflow file for this run

name: Rust
on:
push:
branches: [master]
paths:
- Anchor.toml
- .github/workflows/rust.yml
- lib/**
- programs/**
- Cargo.*
pull_request:
branches: [master]
paths:
- Anchor.toml
- .github/workflows/rust.yml
- lib/**
- programs/**
- Cargo.*
env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN: nightly-2021-12-14
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust nightly
uses: actions-rs/toolchain@v1
with:
override: true
profile: minimal
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v1
- name: Run fmt
run: cargo fmt -- --check
- name: Run clippy
run: cargo clippy --all-targets -- --deny=warnings
- name: Check if publish works
run: cargo publish --no-verify --dry-run
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust nightly
uses: actions-rs/toolchain@v1
with:
override: true
profile: minimal
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v1
- name: Run unit tests
run: cargo test --lib