Skip to content

Prepare for self-hosted runner #3055

Prepare for self-hosted runner

Prepare for self-hosted runner #3055

Workflow file for this run

name: "Rustfmt (check)"
on:
push:
branches: ["main", "release-*"]
pull_request:
workflow_dispatch:
# Cancel a currently running workflow from the same PR, branch or tag when a new workflow is
# triggered (ref https://stackoverflow.com/a/72408109)
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
rustfmt:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set rust version via common env file
run: cat .github/env >> $GITHUB_ENV
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@master
with:
targets: "wasm32-unknown-unknown"
components: "rustfmt"
toolchain: "nightly-${{env.RUST_NIGHTLY_VERSION}}"
- name: Install taplo
run: |
cargo install taplo-cli --version $TAPLO_VERSION
- name: Rustfmt (check)
run: cargo +nightly-$RUST_NIGHTLY_VERSION fmt --all -- --check
- name: Taplo (check)
run: taplo format --check --config .config/taplo.toml