1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-12-22 22:51:12 +02:00

ci: use pinned nightly rustfmt to make unstable features take effect (#2896)

## What does this PR do?

This PR extends the existing `format` job in
`.github/workflows/build.yml` to
**check Rust formatting with nightly `rustfmt`**:

**Closes #2794**
This commit is contained in:
Luciefer
2025-09-10 12:36:47 +01:00
committed by GitHub
parent 30710e4a78
commit 4731acf53f
5 changed files with 47 additions and 11 deletions

View File

@@ -13,6 +13,8 @@ env:
jobs:
format:
runs-on: ubuntu-latest
env:
NIGHTLY_VERSION: nightly-2025-09-01
steps:
- name: Checkout
uses: actions/checkout@v5
@@ -22,10 +24,10 @@ jobs:
sudo apt update
sudo apt install gettext yapf3
- name: Install nightly rustfmt
- name: Install pinned nightly for rustfmt
run: |
rustup default nightly
rustup component add rustfmt
rustup toolchain install --profile minimal "$NIGHTLY_VERSION"
rustup component add rustfmt --toolchain "$NIGHTLY_VERSION"
- name: Check formatting
uses: dprint/check@v2.3