-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (54 loc) · 1.75 KB
/
Copy pathci.yml
File metadata and controls
65 lines (54 loc) · 1.75 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
name: CI
on:
push:
branches: [main]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
# git-queue's commit/sync use `git replay` and amend/reword use
# `git history` — both need a recent git. Pull the newest from the PPA.
# Tests self-skip any feature the installed git still lacks.
- name: Install latest git
run: |
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update
sudo apt-get install -y git
git --version
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
- name: Build
run: cargo build --verbose
# Note: `submit`/`yank` need an authenticated `gh` and a GitHub repo, so
# they aren't covered here. The rest run against throwaway local repos.
- name: Test
run: cargo test --verbose
# Verify Windows portability: the code must compile AND the full test suite
# (including the git-driven integration + view tests, which exercise the
# `cp`/binary-based rebase editors) must pass. Tests self-skip any git feature
# the runner's git lacks.
windows:
name: Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Git version
run: git --version
- name: Build
run: cargo build --verbose
- name: Test
run: cargo test --verbose