Skip to content

Commit

Permalink
CI: still finetunig for page generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
rlejeune74 committed Jan 1, 2024
1 parent ef9e4e9 commit 28682e8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 33 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/audit-check.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Publish pages

on:
push:
branches: ["master"]
branches:
- master

permissions:
contents: read
Expand Down
34 changes: 16 additions & 18 deletions .github/workflows/ci.yml → .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci
name: Rust CI

on:
push:
Expand All @@ -15,26 +15,15 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Install stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy, rustfmt

- name: Run rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check --verbose

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --tests --benches -- -D warnings
- run: cargo fmt -- --check --verbose
- run: cargo clippy --all-targets --tests --benches -- -D warnings

test:
strategy:
Expand All @@ -50,10 +39,7 @@ jobs:
profile: minimal
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --no-fail-fast
- run: cargo test --all-features --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"
Expand All @@ -64,3 +50,15 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ${{ steps.coverage.outputs.report }}
- name: Report coverage in PR status for the current commit
if: github.ref_name != 'master'
run: |
set -eu
total=$(cat ${COV_REPORT_DIR}/badges/flat.svg | egrep '<title>coverage: ' | cut -d: -f 2 | cut -d% -f 1 | sed 's/ //g')
curl -s "https://rlejeune74:${GITHUB_TOKEN}@api.github.com/repos/rlejeune74/BoulderRust/statuses/${COMMIT_SHA}" -d "{\"state\": \"success\",\"target_url\": \"https://github.com/rlejeune74/BoulderRust/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 }}

0 comments on commit 28682e8

Please sign in to comment.