Skip to content

Align Cargo.toml to Cargo.lock (clap:4.5.7->4.5.8) #188

Align Cargo.toml to Cargo.lock (clap:4.5.7->4.5.8)

Align Cargo.toml to Cargo.lock (clap:4.5.7->4.5.8) #188

Workflow file for this run

---
name: "Rust"
"on":
push:
branches: ["main"]
paths-ignore:
- '**.md'
- '.wordlist.txt'
pull_request:
paths-ignore:
- '**.md'
- '.wordlist.txt'
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os:
- fedora:latest
- quay.io/centos/centos:stream9
- debian:latest
- ubuntu:latest
stable: [true]
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: bash .github/workflows/install-dependencies
- name: Setup toolchain (coverage)
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy, rustfmt
- name: Build (release)
run: cargo build --release --verbose
- name: Run tests (release)
run: cargo test --release --verbose
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Run tests (memory safety)
run: |
cargo install cargo-valgrind
cargo valgrind test --verbose
- name: Clippy
run: cargo clippy --verbose -- --deny "warnings"
- name: Check formatting
run: cargo fmt --all -- --check
- name: Clean (coverage)
run: cargo clean --verbose
- name: Install grcov (coverage)
run: cargo install grcov --verbose
- name: Run tests (coverage)
run: cargo test --all --no-fail-fast
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: >
-Zprofile -Ccodegen-units=1 -Cinline-threshold=0
-Clink-dead-code -Coverflow-checks=off -Cpanic=abort
-Zpanic_abort_tests -Cinstrument-coverage
RUSTDOCFLAGS: >
-Zprofile -Ccodegen-units=1 -Cinline-threshold=0
-Clink-dead-code -Coverflow-checks=off -Cpanic=abort
-Zpanic_abort_tests -Cinstrument-coverage
- name: Gather data (coverage)
id: coverage
uses: sarroutbi/grcov@v0.1.6
- name: Output show (coverage)
run: |
set -eu
echo "COVERAGE:$(cat ${COV_REPORT_DIR}/badges/flat.svg \
| egrep '<title>coverage: ' | egrep -o "[0-9]{1,2}%" \
| sed 's/ //g')"
env:
COV_REPORT_DIR: ${{ steps.coverage.outputs.report }}
- name: Report in PR status for the current commit (coverage)
if: github.ref_name != 'main'
run: |
set -eu
tree ${COV_REPORT_DIR}
total=$(cat ${COV_REPORT_DIR}/badges/flat.svg | \
egrep '<title>coverage: ' | \
egrep -o "[0-9]{1,2}" | sed 's/ //g')
curl -s "https://sarroutbi:${GITHUB_TOKEN}@api.github.com/repos/sarroutbi/koji-retriever/statuses/${COMMIT_SHA}"\
-d "{\"state\": \"success\",\"target_url\": \"https://github.com/sarroutbi/koji-retriever/pull/${PULL_NUMBER}/checks?check_run_id=${RUN_ID}\",\"description\": \"${total}%\",\"context\": \"Measured coverage\"}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
RUN_ID: ${{ github.run_id }}
PULL_NUMBER: ${{ github.event.pull_request.number }}
COV_REPORT_DIR: ${{ steps.coverage.outputs.report }}
container:
image: ${{matrix.os}}
env:
DISTRO: ${{matrix.os}}
run:
set -eu
echo "DISTRO:${DISTRO}"