Skip to content

Commit 0033c1b

Browse files
committed
toolchain integration, e2e-tests
1 parent 34bf843 commit 0033c1b

34 files changed

+4133
-278
lines changed

.github/workflows/ci.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build:
14+
name: Build & Test
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, macos-latest]
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Setup Rust
24+
uses: dtolnay/rust-toolchain@stable
25+
26+
- name: Cache cargo registry
27+
uses: actions/cache@v4
28+
with:
29+
path: |
30+
~/.cargo/registry
31+
~/.cargo/git
32+
target
33+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
34+
restore-keys: |
35+
${{ runner.os }}-cargo-
36+
37+
- name: Build
38+
run: cargo build --release
39+
40+
- name: Run unit tests
41+
run: cargo test --lib
42+
43+
- name: Install cargo-jam
44+
run: cargo install --path . --force
45+
46+
- name: Setup JAM toolchain
47+
run: cargo jam setup
48+
49+
- name: Verify toolchain installation
50+
run: cargo jam setup --info
51+
52+
e2e-test:
53+
name: End-to-End Tests
54+
runs-on: ubuntu-latest
55+
needs: build
56+
57+
steps:
58+
- uses: actions/checkout@v4
59+
60+
- name: Setup Rust
61+
uses: dtolnay/rust-toolchain@stable
62+
63+
- name: Cache cargo registry
64+
uses: actions/cache@v4
65+
with:
66+
path: |
67+
~/.cargo/registry
68+
~/.cargo/git
69+
target
70+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
71+
restore-keys: |
72+
${{ runner.os }}-cargo-
73+
74+
- name: Install cargo-jam
75+
run: cargo install --path . --force
76+
77+
- name: Setup JAM toolchain
78+
run: cargo jam setup
79+
80+
- name: Run end-to-end tests
81+
run: cargo jam test --verbose
82+
timeout-minutes: 5
83+
84+
lint:
85+
name: Lint
86+
runs-on: ubuntu-latest
87+
88+
steps:
89+
- uses: actions/checkout@v4
90+
91+
- name: Setup Rust
92+
uses: dtolnay/rust-toolchain@stable
93+
with:
94+
components: rustfmt, clippy
95+
96+
- name: Check formatting
97+
run: cargo fmt --all -- --check
98+
99+
- name: Clippy
100+
run: cargo clippy --all-targets --all-features -- -D warnings

0 commit comments

Comments
 (0)