diff --git a/.github/workflows/devenv.yml b/.github/workflows/devenv.yml new file mode 100644 index 0000000..686df5c --- /dev/null +++ b/.github/workflows/devenv.yml @@ -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 diff --git a/devenv.nix b/devenv.nix index 42c19bc..bcf4b95 100644 --- a/devenv.nix +++ b/devenv.nix @@ -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"