build: taskfile cleanup #54
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
name: Nix | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Nix Cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Build Cmprss | |
run: nix build | |
# Runs all the other checks: formatting, building docs, clippy, etc. | |
- name: Nix Flake Checks | |
# Run 1 at a time and print all the log files | |
run: nix flake check --max-jobs 1 -L | |
# If everything is successful so far, build and run test coverage | |
- name: Build Coverage | |
run: nix build -L .#coverage | |
# Upload code coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./result/lcov.info | |
# Run the security audit | |
- name: Security Audit | |
run: nix build .#audit |