Skip to content

Commit

Permalink
fix: workflow utilize full nix potential
Browse files Browse the repository at this point in the history
  • Loading branch information
orzklv committed Oct 19, 2024
1 parent 750812c commit f3fd2bc
Showing 1 changed file with 26 additions and 19 deletions.
45 changes: 26 additions & 19 deletions .github/workflows/test.yml
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 .

0 comments on commit f3fd2bc

Please sign in to comment.