-
Notifications
You must be signed in to change notification settings - Fork 16
42 lines (40 loc) · 1.2 KB
/
ci.yaml
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
name: typst_book::ci
on: [push, pull_request]
env:
RUSTFLAGS: '-Dwarnings'
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Download Repo
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Artifact Cache
uses: Swatinem/rust-cache@v2
- name: Install Yarn
uses: borales/actions-yarn@v4
with:
cmd: install # will run `yarn install` command
dir: 'frontend'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # if needed
- name: Build JavaScript packages
uses: borales/actions-yarn@v4
with:
cmd: build
dir: 'frontend'
- name: Fmt check
run: cargo fmt --check --all
- name: Clippy check
run: cargo clippy --workspace --all-targets
- name: Documentation check
run: cargo doc --workspace --no-deps
- name: Build
run: |
cargo build --release --workspace
- name: Build Book
run: |
cargo run --release --bin typst-book -- build --path-to-root /typst-book/ -w . github-pages/docs
- name: Test
run: cargo test --workspace --no-fail-fast