mirror of
https://github.com/4cuck/teapawt.git
synced 2026-10-27 19:04:35 +00:00
build: align licensing, configuration, CI, and Nix packaging
This commit is contained in:
1 parent
bbf2ab3442
commit
f2f531869b
10 files changed
+635
-317
No files matched your search
@@ -0,0 +1,94 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
push:
|
||||
branches: [master]
|
||||
merge_group:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name != 'push' }}
|
||||
|
||||
env:
|
||||
CARGO_INCREMENTAL: 0
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
fmt:
|
||||
name: Format
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@9f698171ed81b15d1823a05fc7211befd50c8ae0 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: cachix/install-nix-action@b97f05dcb019ddea06450a50ef6203d2fdc19fee # v31
|
||||
- name: Check Rust formatting
|
||||
run: nix develop --command cargo fmt --all --check
|
||||
|
||||
clippy:
|
||||
name: Clippy
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 40
|
||||
steps:
|
||||
- uses: actions/checkout@9f698171ed81b15d1823a05fc7211befd50c8ae0 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: cachix/install-nix-action@b97f05dcb019ddea06450a50ef6203d2fdc19fee # v31
|
||||
- name: Run Clippy
|
||||
run: nix develop --command cargo clippy --all-targets --locked -- -D warnings
|
||||
|
||||
deny:
|
||||
name: Dependency Audit
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@9f698171ed81b15d1823a05fc7211befd50c8ae0 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: cachix/install-nix-action@b97f05dcb019ddea06450a50ef6203d2fdc19fee # v31
|
||||
- name: Check dependency policy
|
||||
run: nix develop --command cargo deny check
|
||||
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 40
|
||||
steps:
|
||||
- uses: actions/checkout@9f698171ed81b15d1823a05fc7211befd50c8ae0 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: cachix/install-nix-action@b97f05dcb019ddea06450a50ef6203d2fdc19fee # v31
|
||||
- name: Run test suite
|
||||
run: nix develop --command cargo nextest run --all-targets --locked
|
||||
|
||||
nix:
|
||||
name: Nix Package
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 50
|
||||
steps:
|
||||
- uses: actions/checkout@9f698171ed81b15d1823a05fc7211befd50c8ae0 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: cachix/install-nix-action@b97f05dcb019ddea06450a50ef6203d2fdc19fee # v31
|
||||
- name: Restore and save Nix store paths
|
||||
uses: nix-community/cache-nix-action@7df957e333c1e5da7721f60227dbba6d06080569 # v7
|
||||
with:
|
||||
primary-key: nix-${{ runner.os }}-${{ hashFiles('flake.nix', '.tack/pins.lock.json', 'Cargo.lock', 'Cargo.toml', 'nix/**', 'src/**', 'public/**', 'config/**') }}
|
||||
restore-prefixes-first-match: nix-${{ runner.os }}-
|
||||
gc-max-store-size-linux: 5G
|
||||
purge: true
|
||||
purge-prefixes: nix-${{ runner.os }}-
|
||||
purge-created: 0
|
||||
purge-last-accessed: 0
|
||||
purge-primary-key: never
|
||||
- name: Check flake outputs
|
||||
run: nix flake check --print-build-logs
|
||||
- name: Build teapot
|
||||
run: nix build .# --no-link -L
|
||||
Reference in new issue
Block a user