mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 20:44:20 +00:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.1 to 6.0.2. - [Release notes](https://github.com/actions/checkout/releases) - [Commits](https://github.com/actions/checkout/compare/v6.0.1...v6.0.2) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
61 lines
1.9 KiB
YAML
61 lines
1.9 KiB
YAML
# Surface Rust warnings on PRs that touch any Rust code.
|
|
# Not a required check so we never block people over new warnings
|
|
# that might come from a new Rust version being released.
|
|
name: Rust warnings
|
|
on:
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
- reopened
|
|
paths:
|
|
- '**.rs'
|
|
- '!**.inc.rs'
|
|
merge_group:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
|
|
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
rust-warnings:
|
|
env:
|
|
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
|
|
|
|
runs-on: ubuntu-24.04
|
|
|
|
if: >-
|
|
${{!(false
|
|
|| contains(github.event.head_commit.message, '[DOC]')
|
|
|| contains(github.event.pull_request.title, '[DOC]')
|
|
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|
|
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
|
|
)}}
|
|
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Install Rust
|
|
run: rustup default beta
|
|
|
|
- name: Rust warnings
|
|
shell: bash
|
|
run: |
|
|
set -eu
|
|
cargo check --quiet --all-features --message-format=json \
|
|
| jq -r 'select(.message.level | IN("warning", "error")) | .message.rendered' \
|
|
| tee messages.txt
|
|
(exit "${PIPESTATUS[0]}") && ! grep --quiet '[^[:space:]]' messages.txt
|
|
|
|
- name: "📜 `rustdoc` warnings"
|
|
shell: bash
|
|
run: |
|
|
set -eu
|
|
cargo doc --document-private-items --all --no-deps --message-format=json \
|
|
| jq -r 'select(.message.level | IN("warning", "error")) | .message.rendered' \
|
|
| tee messages.txt
|
|
(exit "${PIPESTATUS[0]}") && ! grep --quiet '[^[:space:]]' messages.txt
|