Skip to content

improve node

improve node #28

Workflow file for this run

name: Rust
on:
push:
pull_request:
branches: ["master"]
env:
CARGO_TERM_COLOR: always
jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install latest nightly
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Cache Rust
uses: Swatinem/rust-cache@v2
- name: Run cargo fmt
run: cargo fmt --all --check
build-default:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache Rust
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build --verbose
build-shigami:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache Rust
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build --no-default-features --features shinigami --verbose
- name: Run tests
run: cargo test --no-default-features --features shinigami --verbose
env:
PWD: ${{ github.workspace }} # without it ci can't see env!("PWD")