Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0df4371f7 | ||
|
|
e2be7ff6de | ||
|
|
88d9b99165 | ||
|
|
361a6f4587 |
@@ -19,8 +19,10 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install SSH client
|
- name: Install SSH client
|
||||||
run: |
|
run: |
|
||||||
apt-get update -qq
|
if ! command -v ssh >/dev/null 2>&1; then
|
||||||
apt-get install -y -qq --no-install-recommends openssh-client
|
apt-get update -qq
|
||||||
|
apt-get install -y -qq --no-install-recommends openssh-client
|
||||||
|
fi
|
||||||
- name: Render measured benchmark history
|
- name: Render measured benchmark history
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
|||||||
@@ -17,7 +17,34 @@ jobs:
|
|||||||
CARGO_BUILD_JOBS: 2
|
CARGO_BUILD_JOBS: 2
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Detect README-only change
|
||||||
|
id: surface
|
||||||
|
run: |
|
||||||
|
surface=full
|
||||||
|
if [ "$GITHUB_EVENT_NAME" = pull_request ] &&
|
||||||
|
{ [ "$GITHUB_BASE_REF" = main ] || [ "$GITHUB_BASE_REF" = next ]; } &&
|
||||||
|
base="$(git merge-base HEAD "origin/$GITHUB_BASE_REF" 2>/dev/null)" &&
|
||||||
|
changed="$(git diff --name-only "$base" HEAD)" &&
|
||||||
|
[ "$changed" = README.md ]; then
|
||||||
|
surface=documentation
|
||||||
|
fi
|
||||||
|
echo "surface=$surface" >> "$GITHUB_OUTPUT"
|
||||||
|
- name: Check README-only change
|
||||||
|
if: steps.surface.outputs.surface == 'documentation'
|
||||||
|
run: |
|
||||||
|
base="$(git merge-base HEAD "origin/$GITHUB_BASE_REF")"
|
||||||
|
git diff --check "$base" HEAD
|
||||||
|
if git grep -nIE '^[[:space:]]*-----BEGIN (RSA |EC |OPENSSH )?PRIVATE KEY-----[[:space:]]*$' --; then
|
||||||
|
echo "private key material found in tracked source" >&2
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
status=$?
|
||||||
|
[ "$status" -eq 1 ]
|
||||||
|
fi
|
||||||
- name: Check source
|
- name: Check source
|
||||||
|
if: steps.surface.outputs.surface != 'documentation'
|
||||||
run: |
|
run: |
|
||||||
rustup component add rustfmt
|
rustup component add rustfmt
|
||||||
cargo fmt --check
|
cargo fmt --check
|
||||||
|
|||||||
@@ -22,8 +22,10 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Install Pages SSH client
|
- name: Install Pages SSH client
|
||||||
run: |
|
run: |
|
||||||
apt-get update -qq
|
if ! command -v ssh >/dev/null 2>&1; then
|
||||||
apt-get install -y -qq --no-install-recommends openssh-client
|
apt-get update -qq
|
||||||
|
apt-get install -y -qq --no-install-recommends openssh-client
|
||||||
|
fi
|
||||||
- name: Install Rust quality tools
|
- name: Install Rust quality tools
|
||||||
run: rustup component add rustfmt clippy
|
run: rustup component add rustfmt clippy
|
||||||
- name: Formatting
|
- name: Formatting
|
||||||
@@ -54,12 +56,18 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
cargo test --release --locked -- --ignored --nocapture --test-threads=1 | tee bench-current.txt
|
cargo test --release --locked -- --ignored --nocapture --test-threads=1 | tee bench-current.txt
|
||||||
|
- name: Restore coverage tool
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: /root/.cargo/bin/cargo-llvm-cov
|
||||||
|
key: cargo-llvm-cov-0.8.7-rust-1.97.1-${{ runner.os }}
|
||||||
- name: Coverage tool
|
- name: Coverage tool
|
||||||
run: |
|
run: |
|
||||||
rustup component add llvm-tools-preview
|
rustup component add llvm-tools-preview
|
||||||
if ! command -v cargo-llvm-cov >/dev/null 2>&1; then
|
if [ "$(cargo llvm-cov --version 2>/dev/null || true)" != 'cargo-llvm-cov 0.8.7' ]; then
|
||||||
cargo install --locked cargo-llvm-cov --version 0.8.7
|
cargo install --locked --force cargo-llvm-cov --version 0.8.7
|
||||||
fi
|
fi
|
||||||
|
[ "$(cargo llvm-cov --version)" = 'cargo-llvm-cov 0.8.7' ]
|
||||||
- name: Unit test coverage
|
- name: Unit test coverage
|
||||||
run: |
|
run: |
|
||||||
mkdir -p coverage
|
mkdir -p coverage
|
||||||
|
|||||||
Reference in New Issue
Block a user