Skip to content

Commit 9c58a7b

Browse files
committed
fix: correct indentation in coverage job
1 parent 563ef3c commit 9c58a7b

File tree

1 file changed

+44
-39
lines changed

1 file changed

+44
-39
lines changed

.github/workflows/ci.yml

Lines changed: 44 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -33,41 +33,41 @@ jobs:
3333
toolchain: ${{ matrix.rust }}
3434
components: rustfmt, clippy
3535

36-
- name: Cache cargo registry
37-
uses: actions/cache@v4
38-
with:
39-
path: |
40-
~/.cargo/registry
41-
~/.cargo/git
42-
target
43-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
44-
45-
- name: Check formatting
46-
run: cargo fmt --all -- --check
47-
continue-on-error: true
48-
id: fmt-check
49-
50-
- name: Formatting feedback
51-
if: steps.fmt-check.outcome == 'failure'
52-
run: |
53-
echo "::warning::Code formatting issues detected!"
54-
echo "Please run 'cargo fmt --all' to fix formatting."
55-
echo "Or add this to your pre-commit hook:"
56-
echo " cargo fmt --all"
57-
58-
- name: Run clippy
59-
run: cargo clippy --all-targets --all-features -- -D warnings
60-
continue-on-error: true
61-
id: clippy-check
62-
63-
- name: Clippy feedback
64-
if: steps.clippy-check.outcome == 'failure'
65-
run: |
66-
echo "::warning::Clippy issues detected!"
67-
echo "Please run 'cargo clippy --all-targets --all-features --fix --allow-dirty' to fix issues."
68-
echo "Or add this to your development workflow:"
69-
echo " cargo clippy --fix --allow-dirty"
70-
echo "Or run './scripts/fix-code-quality.sh' to auto-fix both formatting and clippy issues."
36+
- name: Cache cargo registry
37+
uses: actions/cache@v4
38+
with:
39+
path: |
40+
~/.cargo/registry
41+
~/.cargo/git
42+
target
43+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
44+
45+
- name: Check formatting
46+
run: cargo fmt --all -- --check
47+
continue-on-error: true
48+
id: fmt-check
49+
50+
- name: Formatting feedback
51+
if: steps.fmt-check.outcome == 'failure'
52+
run: |
53+
echo "::warning::Code formatting issues detected!"
54+
echo "Please run 'cargo fmt --all' to fix formatting."
55+
echo "Or add this to your pre-commit hook:"
56+
echo " cargo fmt --all"
57+
58+
- name: Run clippy
59+
run: cargo clippy --all-targets --all-features -- -D warnings
60+
continue-on-error: true
61+
id: clippy-check
62+
63+
- name: Clippy feedback
64+
if: steps.clippy-check.outcome == 'failure'
65+
run: |
66+
echo "::warning::Clippy issues detected!"
67+
echo "Please run 'cargo clippy --all-targets --all-features --fix --allow-dirty' to fix issues."
68+
echo "Or add this to your development workflow:"
69+
echo " cargo clippy --fix --allow-dirty"
70+
echo "Or run './scripts/fix-code-quality.sh' to auto-fix both formatting and clippy issues."
7171
7272
- name: Build
7373
run: cargo build --verbose
@@ -102,13 +102,13 @@ jobs:
102102
key: ${{ runner.os }}-cargo-coverage-${{ hashFiles('**/Cargo.lock') }}
103103

104104
- name: Generate code coverage
105-
run: cargo llvm-cov --all-features --lcov --output-path lcov.info
105+
run: cargo llvm-cov --all-features --lcov --output-path lcov.info
106+
106107
- name: Upload coverage report
107108
uses: actions/upload-artifact@v4
108109
with:
109110
name: coverage-report
110111
path: lcov.info
111-
112112

113113
security:
114114
name: Security Audit
@@ -126,6 +126,9 @@ jobs:
126126
name: Code Review Agent
127127
runs-on: ubuntu-latest
128128
if: github.event_name == 'pull_request'
129+
permissions:
130+
pull-requests: write
131+
contents: read
129132
steps:
130133
- uses: actions/checkout@v4
131134

@@ -139,6 +142,8 @@ jobs:
139142

140143
- name: Comment on PR if issues found
141144
if: failure()
142-
run: gh pr comment ${{ github.event.pull_request.number }} --body "Code review agent detected issues. Please address the clippy warnings."
145+
run: |
146+
gh pr comment $PR_NUMBER --body "Code review agent detected issues. Please address the clippy warnings."
143147
env:
144-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
148+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
149+
PR_NUMBER: ${{ github.event.pull_request.number }}

0 commit comments

Comments
 (0)