name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Nix
uses: cachix/install-nix-action@v20
- name: Enter Nix develop environment and build (--no-default-features)
run: nix develop --command cargo build --verbose --no-default-features
- name: Enter Nix develop environment and run tests (--no-default-features)
run: nix develop --command cargo test --verbose --no-default-features
- name: Enter Nix develop environment and run cargo clean
run: nix develop --command cargo clean
- name: Enter Nix develop environment and build
run: nix develop --command cargo build --verbose
- name: Enter Nix develop environment and run tests
run: nix develop --command cargo test --verbose