chore(release): bump cli versions to 0.6.8 #1032
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| checks: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "20" | |
| - name: Install zsh + xvfb + ripgrep | |
| run: sudo apt-get update && sudo apt-get install -y zsh xvfb xauth ripgrep | |
| - name: Install cargo-nextest | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-nextest | |
| - name: Nils CLI checks (includes third-party-artifacts-audit, Completion asset audit, docs-hygiene-audit, test-stale-audit) | |
| env: | |
| NILS_CLI_TEST_RUNNER: nextest | |
| run: bash scripts/ci/nils-cli-checks-entrypoint.sh --xvfb | |
| - name: Publish JUnit report | |
| if: always() && hashFiles('target/nextest/ci/junit.xml') != '' | |
| uses: mikepenz/action-junit-report@v6 | |
| with: | |
| token: ${{ github.token }} | |
| check_name: JUnit Test Report | |
| report_paths: target/nextest/ci/junit.xml | |
| detailed_summary: true | |
| group_suite: true | |
| include_passed: true | |
| - name: Upload JUnit XML | |
| if: always() && hashFiles('target/nextest/ci/junit.xml') != '' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: junit-nextest | |
| path: target/nextest/ci/junit.xml | |
| test_macos: | |
| runs-on: macos-14 | |
| permissions: | |
| contents: read | |
| checks: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "20" | |
| - name: Install bash + ripgrep | |
| run: | | |
| if ! /opt/homebrew/bin/bash --version >/dev/null 2>&1; then | |
| brew install bash | |
| fi | |
| if ! command -v rg >/dev/null 2>&1; then | |
| brew install ripgrep | |
| fi | |
| - name: Install cargo-nextest | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-nextest | |
| - name: Nils CLI checks (includes third-party-artifacts-audit, Completion asset audit, docs-hygiene-audit, test-stale-audit) | |
| env: | |
| NILS_CLI_TEST_RUNNER: nextest | |
| run: /opt/homebrew/bin/bash scripts/ci/nils-cli-checks-entrypoint.sh | |
| - name: Publish JUnit report | |
| if: always() && hashFiles('target/nextest/ci/junit.xml') != '' | |
| uses: mikepenz/action-junit-report@v6 | |
| with: | |
| token: ${{ github.token }} | |
| check_name: JUnit Test Report (macOS) | |
| report_paths: target/nextest/ci/junit.xml | |
| detailed_summary: true | |
| group_suite: true | |
| include_passed: true | |
| - name: Upload JUnit XML | |
| if: always() && hashFiles('target/nextest/ci/junit.xml') != '' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: junit-nextest-macos | |
| path: target/nextest/ci/junit.xml | |
| coverage: | |
| runs-on: macos-14 | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| env: | |
| COVERAGE_FAIL_UNDER_LINES: "85" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: llvm-tools-preview | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install cargo tools | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: | | |
| cargo-llvm-cov | |
| cargo-nextest | |
| - name: Clear previous coverage outputs | |
| run: rm -rf target/coverage && mkdir -p target/coverage | |
| - name: Generate LCOV report | |
| run: cargo llvm-cov nextest --profile ci --workspace --lcov --output-path target/coverage/lcov.info --fail-under-lines "$COVERAGE_FAIL_UNDER_LINES" | |
| - name: Generate HTML report | |
| if: always() && hashFiles('target/coverage/lcov.info') != '' | |
| run: cargo llvm-cov report --html --output-dir target/coverage | |
| - name: Run doctests (not included in coverage) | |
| run: cargo test --workspace --doc | |
| - name: Coverage summary | |
| if: always() | |
| run: | | |
| env GITHUB_STEP_SUMMARY=/dev/stdout bash scripts/ci/coverage-summary.sh target/coverage/lcov.info \ | |
| | tee target/coverage/coverage-summary.md >> "$GITHUB_STEP_SUMMARY" | |
| - name: PR comment (sticky coverage summary) | |
| if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false && hashFiles('target/coverage/lcov.info') != '' | |
| uses: marocchino/sticky-pull-request-comment@v3 | |
| with: | |
| header: coverage | |
| path: target/coverage/coverage-summary.md | |
| - name: Upload coverage LCOV | |
| if: always() && hashFiles('target/coverage/lcov.info') != '' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage-lcov | |
| path: target/coverage/lcov.info | |
| retention-days: 7 | |
| - name: Upload coverage HTML | |
| if: always() && hashFiles('target/coverage/html/index.html') != '' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage-html | |
| path: target/coverage/html | |
| retention-days: 7 | |
| - name: Cleanup coverage outputs (avoid bloating cache) | |
| if: always() | |
| run: rm -rf target/coverage | |
| coverage_badge: | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| needs: | |
| - coverage | |
| permissions: | |
| actions: read | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download coverage LCOV | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: coverage-lcov | |
| path: target/coverage | |
| - name: Generate coverage badge | |
| run: | | |
| mkdir -p /tmp/coverage-badge | |
| bash scripts/ci/coverage-badge.sh target/coverage/lcov.info /tmp/coverage-badge/coverage.svg | |
| - name: Publish coverage badge branch | |
| run: | | |
| set -euo pipefail | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git fetch origin coverage-badge || true | |
| if git show-ref --verify --quiet refs/remotes/origin/coverage-badge; then | |
| git checkout -B coverage-badge origin/coverage-badge | |
| else | |
| git checkout --orphan coverage-badge | |
| git rm -rf . || true | |
| fi | |
| mkdir -p badges | |
| cp /tmp/coverage-badge/coverage.svg badges/coverage.svg | |
| git add badges/coverage.svg | |
| if git diff --cached --quiet; then | |
| echo "Coverage badge unchanged." | |
| exit 0 | |
| fi | |
| git commit -m "chore: update coverage badge" | |
| git push origin HEAD:coverage-badge |