mirror of
https://github.com/matter-labs/teepot.git
synced 2025-07-21 23:23:57 +02:00

This enables to add cargo `fmt`, `clippy` and `deny` to nix, using cached results. Move the `teepot` crate to the `crates` subdir to make the life easier for the `crane` flake. Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
67 lines
1.7 KiB
YAML
67 lines
1.7 KiB
YAML
name: lint
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
fmt:
|
|
name: cargo fmt
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
- uses: cachix/install-nix-action@v26
|
|
with:
|
|
extra_nix_config: |
|
|
access-tokens = github.com=${{ github.token }}
|
|
- uses: cachix/cachix-action@v14
|
|
with:
|
|
name: nixsgx
|
|
extraPullNames: vault-auth-tee
|
|
- name: Enable magic Nix cache
|
|
uses: DeterminateSystems/magic-nix-cache-action@main
|
|
|
|
- name: cargo fmt
|
|
run: nix build -L .#cargoFmt
|
|
|
|
deny:
|
|
name: cargo deny
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
- uses: cachix/install-nix-action@v26
|
|
with:
|
|
extra_nix_config: |
|
|
access-tokens = github.com=${{ github.token }}
|
|
- uses: cachix/cachix-action@v14
|
|
with:
|
|
name: nixsgx
|
|
extraPullNames: vault-auth-tee
|
|
- name: Enable magic Nix cache
|
|
uses: DeterminateSystems/magic-nix-cache-action@main
|
|
|
|
- name: cargo deny
|
|
run: nix build -L .#cargoDeny
|
|
|
|
check-spdx-headers:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
- uses: enarx/spdx@master
|
|
with:
|
|
licenses: Apache-2.0 BSD-3-Clause MIT
|
|
|
|
taplo:
|
|
name: taplo
|
|
runs-on: ubuntu-latest
|
|
container: tamasfe/taplo:latest
|
|
steps:
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
- run: taplo fmt --check
|