Skip to content

Commit 27b0ae5

Browse files
committed
ci(pipeline): add automated quality checks
1 parent 3b7cb1f commit 27b0ae5

File tree

3 files changed

+88
-5
lines changed

3 files changed

+88
-5
lines changed

.github/workflows/ci.yaml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: CI
2+
env:
3+
CI: true
4+
5+
permissions:
6+
contents: read
7+
8+
on:
9+
pull_request:
10+
push:
11+
branches:
12+
- main
13+
paths-ignore:
14+
- '**.md'
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
test:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
24+
- uses: dtolnay/rust-toolchain@6d653acede28d24f02e3cd41383119e8b1b35921
25+
with:
26+
toolchain: stable
27+
28+
- name: Run tests
29+
run: cargo test --locked --all-features --workspace
30+
31+
lint:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
35+
- uses: dtolnay/rust-toolchain@6d653acede28d24f02e3cd41383119e8b1b35921
36+
with:
37+
toolchain: stable
38+
components: rustfmt,clippy
39+
40+
- name: Format
41+
run: cargo fmt --all -- --check
42+
43+
- name: Lint
44+
run: cargo clippy --all-targets --all-features -- -D warnings
45+
46+
coverage:
47+
runs-on: ubuntu-latest
48+
continue-on-error: true
49+
steps:
50+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
51+
- uses: dtolnay/rust-toolchain@6d653acede28d24f02e3cd41383119e8b1b35921
52+
with:
53+
toolchain: stable
54+
components: llvm-tools-preview
55+
56+
- name: Install cargo-llvm-cov
57+
uses: taiki-e/install-action@0e09747a63ae497bf945b3dcaf38fef0050d0109 # v2.62.0
58+
with:
59+
tool: cargo-llvm-cov
60+
61+
- name: Generate code coverage
62+
run: cargo llvm-cov --locked --all-features --workspace --lcov --output-path lcov.info
63+
64+
- name: Upload coverage to Codecov
65+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 #v5.5.1
66+
with:
67+
files: lcov.info
68+
fail_ci_if_error: true
69+
70+
cargo-machete:
71+
runs-on: ubuntu-latest
72+
steps:
73+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
74+
- uses: dtolnay/rust-toolchain@6d653acede28d24f02e3cd41383119e8b1b35921
75+
with:
76+
toolchain: stable
77+
78+
- name: Install cargo-machete
79+
uses: taiki-e/install-action@0e09747a63ae497bf945b3dcaf38fef0050d0109
80+
with:
81+
tool: cargo-machete
82+
83+
- name: Run cargo machete
84+
run: cargo machete

.github/workflows/nightly.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: soar nightly
22
concurrency:
33
group: "${{ github.workflow }}-${{ github.ref }}"
44
cancel-in-progress: true
5-
5+
66
on:
77
push:
88
tags:
@@ -15,7 +15,6 @@ permissions:
1515
id-token: write
1616

1717
jobs:
18-
1918
remove-nightly-tag:
2019
runs-on: ubuntu-latest
2120
steps:

.github/workflows/release.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ name: soar release
22
concurrency:
33
group: "${{ github.workflow }}-${{ github.ref }}"
44
cancel-in-progress: true
5-
5+
66
on:
77
release:
88
types: [published]
99
workflow_dispatch:
10-
10+
1111
permissions:
1212
attestations: write
1313
contents: write
1414
id-token: write
15-
15+
1616
jobs:
1717
publish-binaries:
1818
name: Publish binaries

0 commit comments

Comments
 (0)