github: add workflow to verify nix-shell

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2020-07-12 22:36:59 +05:30
parent 5b5addb689
commit 14e35b73d2
No known key found for this signature in database
GPG Key ID: 366D7BBAD1031E80

31
.github/workflows/nix.yml vendored Normal file
View File

@ -0,0 +1,31 @@
on:
push:
branches:
- develop
name: Verify nix-shell config
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v1
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Nix
uses: cachix/install-nix-action@v10
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Enter nix-shell
run: nix-shell --pure
- name: Run cargo check
run: cargo check