-
Notifications
You must be signed in to change notification settings - Fork 3
72 lines (69 loc) · 2.23 KB
/
Copy pathci.yml
File metadata and controls
72 lines (69 loc) · 2.23 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@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
components: rustfmt, clippy
- uses: taiki-e/install-action@bafb217ce243dd135aa0204d91238f387d005863 # 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@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master
with:
toolchain: ${{ matrix.rust-version }}
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
with:
key: partition-${{ matrix.partition }}
- uses: taiki-e/install-action@11c82bec3ad7f6041db8bd552d47469a973381cd # nextest
- uses: taiki-e/install-action@7a79fe8c3a13344501c80d99cae481c1c9085912 # 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