Skip to content

Merge pull request #1 from bivvy-dev/fix/change-check-semantics #34

Merge pull request #1 from bivvy-dev/fix/change-check-semantics

Merge pull request #1 from bivvy-dev/fix/change-check-semantics #34

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
CLICOLOR_FORCE: 1
RUSTFLAGS: "-D warnings"
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install zsh
run: sudo apt-get update && sudo apt-get install -y zsh
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-ci-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-ci-
- name: Build bivvy
run: cargo build
- name: Run CI workflow
run: target/debug/bivvy run --workflow ci --non-interactive --verbose
- name: Generate coverage badge
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: |
echo "COVERAGE=$(cargo llvm-cov report --json | jq '.data[0].totals.lines.percent' | xargs printf '%.0f')" >> "$GITHUB_ENV"
- name: Update coverage badge
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.GIST_TOKEN }}
gistID: ${{ vars.COVERAGE_GIST_ID }}
filename: bivvy-coverage.json
label: coverage
message: "${{ env.COVERAGE }}%"
valColorRange: ${{ env.COVERAGE }}
minColorRange: 50
maxColorRange: 100