Repository navigation
44 lines (35 loc) · 1.38 KB
/
Copy pathcheck.yaml
File metadata and controls
44 lines (35 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Check
on:
pull_request:
push:
branches: [master]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: check-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
submodules: recursive
# This job builds and runs a pull request's own branch, which for a
# fork is somebody else's code, and a build script is code. The token
# is read-only here and there are no secrets in the job, so there is
# little to reach — and no reason to leave it reachable. Every
# dependency this fetches is public.
persist-credentials: false
- name: Install Nix
uses: cachix/install-nix-action@75c75c31ebece974e48ebc36b4ad125bd97bd97b # v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Install Rust toolchain
run: nix develop . --command rustup toolchain install --profile minimal stable
- name: Check
run: nix develop . --command cargo run --locked --no-default-features --manifest-path tools/site/Cargo.toml -- check
- name: Check photo feature
run: nix develop . --command cargo check --locked --tests --manifest-path tools/site/Cargo.toml --no-default-features --features photos