Skip to content

Commit 8b684df

Browse files
author
xi xiao
committed
ci: add test coverage artifact
1 parent 239ebd8 commit 8b684df

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/pr-ci-merge-main.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ jobs:
4949
with:
5050
components: clippy, rustfmt
5151

52-
# Combine security tools installation
53-
- name: Install Security Tools
52+
# Tools installation
53+
- name: Install Tools
5454
run: |
55-
cargo install cargo-audit cargo-deny --locked
55+
cargo install cargo-audit cargo-deny cargo-tarpaulin --locked
5656
5757
# Group formatting and linting checks
5858
- name: Code Quality Checks
@@ -63,11 +63,16 @@ jobs:
6363
# Run tests with coverage
6464
- name: Run Tests
6565
run: |
66-
cargo install cargo-tarpaulin
67-
cargo tarpaulin --out Xml
66+
cargo tarpaulin --out Xml --output-dir coverage.xml
6867
69-
# Add test coverage reporting
70-
- name: Upload Coverage
68+
# Upload test result as artifact
69+
- name: Upload Coverage Report
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: coverage-report
73+
path: coverage.xml
74+
75+
- name: Upload Coverage to Codev
7176
uses: codecov/codecov-action@v5
7277
with:
7378
token: ${{ secrets.CODECOV_TOKEN }}
@@ -86,4 +91,4 @@ jobs:
8691
~/.cargo/bin/cargo-audit
8792
~/.cargo/bin/cargo-deny
8893
~/.cargo/bin/cargo-tarpaulin
89-
key: ${{ runner.os }}-cargo-tools-${{ hashFiles('**/Cargo.lock') }}
94+
key: ${{ runner.os }}-cargo-tools-${{ hashFiles('**/Cargo.lock') }}

0 commit comments

Comments
 (0)