-
Notifications
You must be signed in to change notification settings - Fork 3
72 lines (69 loc) · 2.02 KB
/
ci.yml
File metadata and controls
72 lines (69 loc) · 2.02 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
on:
push:
branches:
- main
pull_request:
name: CI
jobs:
lint:
name: Lint
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
# We need to fetch the entire history so clippy can run the
# e2e-example/client build script.
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: taiki-e/install-action@just
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
with:
key: partition-${{ matrix.partition }}
- name: Lint (clippy)
run: cargo clippy --all-targets
- name: Lint (rustfmt)
run: cargo xfmt --check
- name: Run rustdoc
run: just rustdoc
- name: Check for differences
run: git diff --exit-code
build-and-test:
name: Build and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
# 1.88 is the MSRV
rust-version: ["1.88", "stable"]
fail-fast: false
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
# We need to fetch the entire history so the tests can run merge-base
# operations.
fetch-depth: 0
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust-version }}
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
with:
key: partition-${{ matrix.partition }}
- uses: taiki-e/install-action@nextest
- uses: taiki-e/install-action@v2
with:
tool: jj-cli
- name: Build
run: cargo build
- name: Run tests
run: cargo nextest run --profile ci
- name: Doctests
run: cargo test --doc