mirror of
https://github.com/Defelo/nginx-oidc.git
synced 2025-05-12 13:02:48 +00:00
chore: add ci
This commit is contained in:
parent
abb8ee311f
commit
ff55908f95
3 changed files with 76 additions and 0 deletions
38
.github/workflows/nix.yml
vendored
Normal file
38
.github/workflows/nix.yml
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
name: Nix
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [develop, staging, trying]
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
fmt:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: DeterminateSystems/nix-installer-action@v16
|
||||
- run: nix fmt -- --ci --on-unmatched error
|
||||
|
||||
generate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: DeterminateSystems/nix-installer-action@v16
|
||||
- run: nix run --accept-flake-config .#generate
|
||||
- run: git diff --exit-code
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: DeterminateSystems/nix-installer-action@v16
|
||||
- uses: ryanccn/attic-action@v0
|
||||
with:
|
||||
endpoint: https://attic.defelo.de/
|
||||
cache: nginx-oidc
|
||||
# atticd-atticadm make-token --sub github --validity 1y --pull nginx-oidc --push nginx-oidc
|
||||
token: ${{ secrets.ATTIC_TOKEN }}
|
||||
- run: nix build -L --keep-going .#checks
|
33
.github/workflows/rust.yml
vendored
Normal file
33
.github/workflows/rust.yml
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
name: Rust
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [develop, staging, trying]
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
clippy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@beta
|
||||
with:
|
||||
components: clippy
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-on-failure: "true"
|
||||
- run: cargo clippy --all-targets -- -D warnings
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@beta
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-on-failure: true
|
||||
- run: cargo test --no-fail-fast --all-features --bins --lib
|
||||
- run: cargo test --no-fail-fast --all-features --doc
|
|
@ -80,4 +80,9 @@
|
|||
}
|
||||
);
|
||||
};
|
||||
|
||||
nixConfig = {
|
||||
extra-substituters = "https://attic.defelo.de/nginx-oidc";
|
||||
extra-trusted-public-keys = "nginx-oidc:SKgT2SASfc9+wOmqMP0AgJOE7j92m3Yt6u7+/v0gxNc=";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue