forked from typst/typst
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (47 loc) · 1.4 KB
/
ci.yml
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
45
46
47
48
49
50
51
52
53
name: Continuous integration
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
RUSTFLAGS: "-Dwarnings"
RUSTDOCFLAGS: "-Dwarnings"
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo build --workspace
- run: cargo test --workspace --no-fail-fast
checks:
name: Check clippy, formatting, and documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --workspace --all-targets
- run: cargo fmt --check --all
- run: cargo doc --workspace --no-deps
min-version:
name: Check mininum Rust version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@1.70.0
- uses: Swatinem/rust-cache@v2
- run: cargo check --workspace
nix-flake:
name: Test Nix Flake
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@v4
- uses: DeterminateSystems/magic-nix-cache-action@v2
- run: nix flake check
- run: nix build
- run: nix shell -c typst --version
- run: nix run . -- --version