Skip to content

Commit

Permalink
Set up formatting in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Feb 17, 2021
1 parent d47c1ee commit e1150e2
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,25 @@ jobs:

- name: cargo test (debug; all features; -Z minimal-versions)
run: cargo -Z minimal-versions test --all-features

format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
default: true
- name: Check formatting
run: |
cd ..
git clone --depth 1 https://github.com/rust-lang/rustfmt
cd rustfmt
export CFG_RELEASE=nightly
export CFG_RELEASE_CHANNEL=nightly
cargo install --path . --force --features rustfmt,cargo-fmt
cd ../rustls && cargo-fmt -- --check

0 comments on commit e1150e2

Please sign in to comment.