forked from release-plz/release-plz
-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (105 loc) · 3.48 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: CI # Continuous Integration
on:
push:
branches:
- main
paths-ignore:
- "**.md"
- "**.js"
- "**.ts"
pull_request:
paths-ignore:
- "**.md"
- "**.js"
- "**.ts"
jobs:
test:
name: Test Suite
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Install cargo-semver-checks
uses: taiki-e/install-action@03381f5ca4d069c7f756fec5d189e036987f842e # v2.46.17
with:
tool: [email protected]
- name: Start containers
run: docker compose up -d --wait
working-directory: ./tests
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@97db979bf844c838b06022f305ca480d01b4d5fe
- name: Run tests
run: cargo test --all-features --workspace
test-no-docker:
name: Test Suite (no Docker)
strategy:
matrix:
include:
- target: aarch64-pc-windows-msvc
os: windows-2022
- target: x86_64-unknown-linux-gnu
os: ubuntu-22.04
- target: x86_64-apple-darwin
os: macos-13
- target: x86_64-pc-windows-msvc
os: windows-2022
- target: x86_64-apple-darwin
os: macos-13
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Install cargo-semver-checks
uses: taiki-e/install-action@03381f5ca4d069c7f756fec5d189e036987f842e # v2.46.17
with:
tool: [email protected]
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@97db979bf844c838b06022f305ca480d01b4d5fe
- name: Run tests
run: cargo test --no-default-features --features all-static --workspace
rustfmt:
name: Rustfmt
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@97db979bf844c838b06022f305ca480d01b4d5fe
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --all --check
clippy:
name: Clippy
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@97db979bf844c838b06022f305ca480d01b4d5fe
with:
components: clippy
- name: Clippy check
run: cargo clippy --all-targets --all-features --workspace -- -D warnings
docs:
name: Docs
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@97db979bf844c838b06022f305ca480d01b4d5fe
- name: Check documentation
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --no-deps --document-private-items --all-features --workspace --examples