Skip to content

Commit 71a2874

Browse files
frankfrank
authored andcommitted
refactor(ci): consolidate check and test jobs into a single workflow step for improved efficiency
1 parent 4a6a191 commit 71a2874

File tree

1 file changed

+3
-32
lines changed

1 file changed

+3
-32
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ env:
1010
CARGO_TERM_COLOR: always
1111

1212
jobs:
13-
check:
14-
name: Check & Lint
13+
check-and-test:
14+
name: Check, Lint & Test
1515
runs-on: ubuntu-latest
1616

1717
steps:
@@ -48,43 +48,14 @@ jobs:
4848
working-directory: src-tauri
4949
run: cargo clippy -- -D warnings
5050

51-
test:
52-
name: Test
53-
runs-on: ubuntu-latest
54-
needs: check
55-
56-
steps:
57-
- name: Checkout repository
58-
uses: actions/checkout@v6
59-
60-
- name: Install Rust toolchain
61-
uses: dtolnay/rust-toolchain@stable
62-
63-
- name: Cache cargo
64-
uses: actions/cache@v5
65-
with:
66-
path: |
67-
~/.cargo/registry/index
68-
~/.cargo/registry/cache
69-
~/.cargo/git/db
70-
src-tauri/target
71-
key: ${{ runner.os }}-cargo-${{ hashFiles('src-tauri/Cargo.lock', 'src-tauri/Cargo.toml') }}
72-
restore-keys: |
73-
${{ runner.os }}-cargo-
74-
75-
- name: Install Linux dependencies
76-
run: |
77-
sudo apt-get update
78-
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
79-
8051
- name: Run tests
8152
working-directory: src-tauri
8253
run: cargo test --verbose
8354

8455
build-check:
8556
name: Build Check
8657
runs-on: ${{ matrix.os }}
87-
needs: test
58+
needs: check-and-test
8859
strategy:
8960
fail-fast: false
9061
matrix:

0 commit comments

Comments
 (0)