-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: workflow utilize full nix potential
- Loading branch information
Showing
1 changed file
with
26 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,31 @@ | ||
name: Test CI | ||
name: "Test CI" | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
|
||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build | ||
run: cargo build --verbose | ||
- name: Format | ||
run: cargo fmt --all -- --check | ||
# - name: Run tests | ||
# run: cargo test --verbose | ||
- name: Clone the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Nix | ||
uses: DeterminateSystems/nix-installer-action@main | ||
|
||
- name: Cache Nix store | ||
uses: DeterminateSystems/magic-nix-cache-action@main | ||
|
||
- name: Build the project | ||
run: nix-shell --run "cargo build --release --verbose" | ||
|
||
- name: Run lint | ||
run: nix-shell --run "cargo clippy --verbose" | ||
|
||
- name: Run format check | ||
run: nix-shell --run "cargo fmt --all -- --check" | ||
|
||
- name: Run tests | ||
run: nix-shell --run "cargo test --verbose" | ||
|
||
- name: Build nix package | ||
run: nix build . |