Skip to content

test(skills): add Phase 1 CLI acceptance harness #1157

test(skills): add Phase 1 CLI acceptance harness

test(skills): add Phase 1 CLI acceptance harness #1157

Workflow file for this run

name: Code Quality Analysis
on:
push:
branches:
- main
- 'fix/**'
- 'feat/**'
- 'docs/**'
- 'qa/**'
- 'refactor/**'
- 'perf/**'
- 'chore/**'
- 'ci/**'
pull_request:
branches:
- main
- 'fix/**'
- 'feat/**'
- 'docs/**'
- 'qa/**'
- 'refactor/**'
- 'perf/**'
- 'chore/**'
- 'ci/**'
workflow_dispatch:
permissions:
contents: read
pull-requests: read
env:
CARGO_TERM_COLOR: always
jobs:
coverage-and-analysis:
name: Coverage, Codecov, and SonarCloud
runs-on: ubuntu-latest
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
AGENTSYNC_LOCAL_SKILLS_REPO: ${{ github.workspace }}/agents-skills
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
persist-credentials: false
- name: Checkout committed agents-skills source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: dallay/agents-skills
ref: c2e79fbb72d146305f82a8e979270795557d24fd
path: agents-skills
persist-credentials: false
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
with:
toolchain: stable
components: llvm-tools-preview
- name: Cache cargo registry
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-coverage-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-coverage-
- name: Install cargo-llvm-cov
run: cargo install cargo-llvm-cov --locked
- name: Generate Rust coverage reports
run: |
cargo llvm-cov clean --workspace
mkdir -p target/coverage
cargo llvm-cov --workspace --all-features --lcov --output-path target/coverage/rust.lcov.info
cargo llvm-cov report --cobertura --output-path target/coverage/rust-cobertura.xml
- name: Upload coverage to Codecov
if: ${{ env.CODECOV_TOKEN != '' }}
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7
with:
files: target/coverage/rust.lcov.info
fail_ci_if_error: true
verbose: true
env:
CODECOV_TOKEN: ${{ env.CODECOV_TOKEN }}
- name: Upload coverage to Codecov (tokenless)
if: ${{ env.CODECOV_TOKEN == '' }}
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7
with:
files: target/coverage/rust.lcov.info
fail_ci_if_error: true
verbose: true
- name: Analyze with SonarCloud
if: ${{ env.SONAR_TOKEN != '' && (github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork) }}
uses: SonarSource/sonarqube-scan-action@22918119ff8e1ca75a623e15c8296b6ea4fbe28f # v8.2.1
with:
args: >-
-Dsonar.projectBaseDir=.
env:
SONAR_TOKEN: ${{ env.SONAR_TOKEN }}