Skip to content

Commit 8bd85f6

Browse files
committed
Refactor CI workflow to separate linting and testing jobs, and run individual tests in parallel
1 parent ae1dd35 commit 8bd85f6

1 file changed

Lines changed: 32 additions & 10 deletions

File tree

.github/workflows/lint_and_test.yml

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,13 @@ name: CI
33
on: [pull_request]
44

55
jobs:
6-
lint_and_test:
7-
runs-on: ${{ matrix.os }}
8-
strategy:
9-
matrix:
10-
os: [ubuntu-latest]
11-
rust: [stable]
12-
6+
lint:
7+
runs-on: ubuntu-latest
138
steps:
149
- name: Set up Rust toolchain
1510
uses: hecrj/setup-rust-action@v2
1611
with:
17-
rust-version: ${{ matrix.rust }}
12+
rust-version: stable
1813

1914
- name: Check out the code
2015
uses: actions/checkout@v4
@@ -25,7 +20,34 @@ jobs:
2520
- name: Run Clippy
2621
run: cargo clippy --all-targets --all-features -- -D warnings
2722

28-
- name: Run tests
23+
test:
24+
needs: lint
25+
runs-on: ubuntu-latest
26+
strategy:
27+
matrix:
28+
test_name: [
29+
"tests::basic_test",
30+
"tests::test_health_endpoint",
31+
"tests::test_join_group",
32+
"tests::test_refresh_empty_group",
33+
"tests::test_refresh_group_with_file",
34+
"tests::test_refresh_group_with_single_repo",
35+
"tests::test_refresh_joined_group",
36+
"tests::test_refresh_nonexistent_group",
37+
"tests::test_replicate_group",
38+
"tests::test_upload_list_delete"
39+
]
40+
41+
steps:
42+
- name: Set up Rust toolchain
43+
uses: hecrj/setup-rust-action@v2
44+
with:
45+
rust-version: stable
46+
47+
- name: Check out the code
48+
uses: actions/checkout@v4
49+
50+
- name: Run individual test
2951
env:
3052
RUST_MIN_STACK: 8388608
31-
run: cargo test --verbose -- --test-threads=1 --nocapture
53+
run: cargo test --verbose -- ${{ matrix.test_name }} --test-threads=1 --nocapture

0 commit comments

Comments
 (0)