Skip to content

Commit f74e5ee

Browse files
ci: deduplicate GHA runs on PR merge and update download links to v1.5.0
Remove push-to-main trigger from test.yml to stop re-running the full test suite after a PR merge. Extract rust-coverage into a standalone coverage.yml workflow that only fires on Rust source changes pushed to main. Update README download table from v1.4.1 to v1.5.0. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 84059ca commit f74e5ee

3 files changed

Lines changed: 57 additions & 51 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Coverage
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'crates/**'
8+
- 'Cargo.*'
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
env:
15+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
16+
17+
jobs:
18+
rust-coverage:
19+
name: Rust Coverage
20+
runs-on: [macOS, ARM64]
21+
timeout-minutes: 25
22+
env:
23+
CARGO_INCREMENTAL: 1
24+
CARGO_TERM_COLOR: always
25+
26+
steps:
27+
- uses: actions/checkout@v6
28+
29+
- name: Setup Tauri build environment
30+
uses: ./.github/actions/setup-tauri-build
31+
with:
32+
mode: check
33+
34+
- uses: cargo-bins/cargo-binstall@main
35+
36+
- name: Install cargo-tarpaulin
37+
run: cargo binstall --no-confirm --force cargo-tarpaulin
38+
39+
- name: Run Rust tests with coverage
40+
run: |
41+
cargo tarpaulin --workspace --out Html --out Json --output-dir coverage \
42+
--ignore-tests --skip-clean \
43+
--exclude-files 'crates/mt-tauri/src/commands/*' 'crates/mt-tauri/src/lib.rs' 'crates/mt-tauri/src/main.rs' 'crates/mt-tauri/src/watcher.rs' 'crates/mt-tauri/src/dialog.rs' 'crates/mt-tauri/src/media_keys.rs' \
44+
--fail-under 50
45+
46+
- name: Upload coverage report
47+
if: always()
48+
continue-on-error: true
49+
uses: actions/upload-artifact@v7
50+
with:
51+
name: rust-coverage
52+
path: coverage/
53+
retention-days: 30

.github/workflows/test.yml

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@ on:
1818
- 'Cargo.*'
1919
- 'taskfiles/**'
2020
- '.github/**'
21-
push:
22-
branches: [main]
23-
paths:
24-
- 'crates/**'
25-
- 'app/**'
26-
- 'Cargo.*'
27-
- 'taskfiles/**'
28-
- '.github/**'
2921

3022
concurrency:
3123
group: ${{ github.workflow }}-${{ github.ref }}
@@ -60,45 +52,6 @@ jobs:
6052
- name: Run Rust tests
6153
run: cargo nextest run --workspace
6254

63-
# Coverage runs only on main push (not PRs) to keep the critical path fast
64-
rust-coverage:
65-
name: Rust Coverage
66-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
67-
runs-on: [macOS, ARM64]
68-
timeout-minutes: 25
69-
env:
70-
CARGO_INCREMENTAL: 1
71-
CARGO_TERM_COLOR: always
72-
73-
steps:
74-
- uses: actions/checkout@v6
75-
76-
- name: Setup Tauri build environment
77-
uses: ./.github/actions/setup-tauri-build
78-
with:
79-
mode: check
80-
81-
- uses: cargo-bins/cargo-binstall@main
82-
83-
- name: Install cargo-tarpaulin
84-
run: cargo binstall --no-confirm --force cargo-tarpaulin
85-
86-
- name: Run Rust tests with coverage
87-
run: |
88-
cargo tarpaulin --workspace --out Html --out Json --output-dir coverage \
89-
--ignore-tests --skip-clean \
90-
--exclude-files 'crates/mt-tauri/src/commands/*' 'crates/mt-tauri/src/lib.rs' 'crates/mt-tauri/src/main.rs' 'crates/mt-tauri/src/watcher.rs' 'crates/mt-tauri/src/dialog.rs' 'crates/mt-tauri/src/media_keys.rs' \
91-
--fail-under 50
92-
93-
- name: Upload coverage report
94-
if: always()
95-
continue-on-error: true
96-
uses: actions/upload-artifact@v7
97-
with:
98-
name: rust-coverage
99-
path: coverage/
100-
retention-days: 30
101-
10255
deno-lint:
10356
name: Deno Lint and Format Check
10457
runs-on: blacksmith-4vcpu-ubuntu-2404
@@ -250,7 +203,7 @@ jobs:
250203
playwright-tests:
251204
name: Playwright E2E Tests
252205
needs: [changes, deno-lint, rust, vitest-tests]
253-
if: ${{ !failure() && !cancelled() && (needs.changes.outputs.frontend == 'true' || github.event_name == 'push') }}
206+
if: ${{ !failure() && !cancelled() && (needs.changes.outputs.frontend == 'true' || github.event_name == 'workflow_dispatch') }}
254207
runs-on: [macOS, ARM64]
255208
timeout-minutes: 20
256209

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
<!-- DOWNLOADS:START -->
3131
| Platform | Architecture | Download |
3232
|----------|--------------|----------|
33-
| macOS | Apple Silicon (ARM64) | [mt_1.4.1_aarch64.dmg](https://github.com/pythoninthegrasses/mt/releases/download/v1.4.1/mt_1.4.1_aarch64.dmg) |
34-
| Linux | x86_64 (amd64) | [mt_1.4.1_amd64.deb](https://github.com/pythoninthegrasses/mt/releases/download/v1.4.1/mt_1.4.1_amd64.deb) |
35-
| Windows | x64 | [mt_1.4.1_x64-setup.exe](https://github.com/pythoninthegrasses/mt/releases/download/v1.4.1/mt_1.4.1_x64-setup.exe) |
33+
| macOS | Apple Silicon (ARM64) | [mt_1.5.0_aarch64.dmg](https://github.com/pythoninthegrasses/mt/releases/download/v1.5.0/mt_1.5.0_aarch64.dmg) |
34+
| Linux | x86_64 (amd64) | [mt_1.5.0_amd64.deb](https://github.com/pythoninthegrasses/mt/releases/download/v1.5.0/mt_1.5.0_amd64.deb) |
35+
| Windows | x64 | [mt_1.5.0_x64-setup.exe](https://github.com/pythoninthegrasses/mt/releases/download/v1.5.0/mt_1.5.0_x64-setup.exe) |
3636
<!-- DOWNLOADS:END -->
3737

3838
## Development

0 commit comments

Comments
 (0)