Skip to content

fix: format

fix: format #30

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: nixbuild/nix-quick-install-action@v28
with:
github_access_token: ${{ secrets.PAT }}
nix_conf: |
netrc-file = /home/runner/.netrc
- uses: bcomnes/netrc-creds@v3
with:
creds: |
[
{
"machine": "github.com",
"login": "git",
"password": "${{ secrets.PAT }}"
},
{
"machine": "api.github.com",
"login": "git",
"password": "${{ secrets.PAT }}"
}
]
- name: Setup Cache
uses: DeterminateSystems/magic-nix-cache-action@v8
- uses: Swatinem/rust-cache@v2
- name: Eval Devshell
run: nix-instantiate shell.nix --add-root shell
- name: Check Format
run: nix-shell shell --run "treefmt --ci"
- name: Lint
run: nix-shell shell --run "cargo clippy -- -D warnings && cargo clippy --no-default-features -- -D warnings"
- name: Run Tests
run: nix-shell shell --run "cargo test --all && cargo test --all --no-default-features"