Skip to content

Commit

Permalink
add devenv to github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
niteshbalusu11 committed Jan 6, 2025
1 parent c688ac7 commit 416811e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/devenv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "devenv build"

on:
pull_request:
push:

jobs:
tests:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv

- name: Install devenv.sh
run: nix profile install nixpkgs#devenv

- Name: Check formatting
run: devenv shell check-fmt

- name: Build the project
run: devenv shell build
10 changes: 9 additions & 1 deletion devenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@

languages.rust.enable = true;

scripts.build.exec = ''bacon'';
# Build the project
scripts.build.exec = ''
cargo build --release
'';

# Check the formatting of the project
scripts.check-fmt.exec = ''
cargo fmt --all -- --check
'';

enterTest = ''
echo "Running tests"
Expand Down

0 comments on commit 416811e

Please sign in to comment.