chore: precommit and spellcheck #3
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: 'Checks' | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
branches: ['main'] | |
defaults: | |
run: | |
shell: devenv shell bash -- -e {0} | |
env: | |
ACTIONS_RUNNER_DEBUG: true | |
jobs: | |
checks: | |
# purposely disabled for now | |
if: false | |
runs-on: ['ubuntu-latest'] | |
steps: | |
- name: 'Checkout Code' | |
uses: actions/checkout@v4 | |
- name: 'Install Nix' | |
uses: cachix/install-nix-action@master | |
- name: 'Setup Cachix' | |
uses: cachix/cachix-action@master | |
with: | |
name: devenv | |
- name: 'Install devenv.sh' | |
run: nix profile install nixpkgs#devenv | |
- name: 'Spellcheck' | |
run: typos | |
- name: 'Format' | |
run: | | |
taplo fmt *.toml | |
nixfmt *.nix --width=100 | |
biome format . --write | |
cargo fmt --all -- --config-path=rustfmt.toml | |
- name: 'Lint' | |
run: | | |
taplo lint *.toml | |
biome lint . --write | |
cargo clippy --all-targets --all-features -- -A clippy::pedantic | |
deadnix --no-lambda-pattern-names && statix check . | |
- name: 'Build' | |
run: | | |
nix build | |
cargo build --all-targets --all-features | |
cargo test --all-targets --all-features |