Skip to content

Try to fix CI with nix develop --ignore-environment #6

Try to fix CI with nix develop --ignore-environment

Try to fix CI with nix develop --ignore-environment #6

Workflow file for this run

name: CI
on: [ push, workflow_dispatch ]
env:
CARGO_TERM_COLOR: always
# Make sure CI fails on all warnings, including Clippy lints
RUSTFLAGS: "-Dwarnings"
jobs:
build_and_test:
name: Build and Test Maelstrom
runs-on: ubuntu-latest
steps:
- name: Get Repository from Git
uses: actions/checkout@v3
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Set up Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Check Nixpkgs Inputs
uses: DeterminateSystems/flake-checker-action@main
with:
fail-mode: true
- name: Set up Rust Cache

Check failure on line 24 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

You have an error in your yaml syntax on line 24
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: maelstrom-${{ hashFiles('**/Cargo.lock') }}
- name: Check Rust Formatting
run: nix develop --ignore-env --keep TERM --keep RUSTFLAGS --keep CARGO_TERM_COLOR --command cargo fmt --check
- name: Lint Rust Code
run: nix develop --ignore-env --keep TERM --keep RUSTFLAGS --keep CARGO_TERM_COLOR --command cargo clippy --all-targets --all-features
- name: Test Rust Code
run: nix develop --ignore-env --keep TERM --keep RUSTFLAGS --keep CARGO_TERM_COLOR --command cargo test
- name: Build Rust Code
run: nix build