Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: check

"on":
pull_request:
workflow_dispatch:

permissions:
id-token: write
contents: write

# this allows a subsequently queued workflow run to interrupt previous runs in pull requests only
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install mise
uses: taiki-e/install-action@v2
with:
tool: mise

- name: Install mise tools
run: |
mise settings add idiomatic_version_file_enable_tools "[]"
mise install
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Run checkers
run: |
mise run check
9 changes: 8 additions & 1 deletion .mise.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[tools]
action-validator = "latest"
"cargo:taplo-cli" = "latest"
"cargo:wasm-pack" = "latest"
"chromedriver" = "146"
Expand All @@ -11,7 +12,7 @@ osv-scanner = "latest"
pipx = "latest"
"pipx:cmake" = "latest"
protoc = "latest"
rust = "latest"
rust = { version = "latest", components = "clippy" }
typos = "latest"

[tasks]
Expand All @@ -23,6 +24,9 @@ editorconfig-check = "ec"
depends = ["cargo-fmt", "dprint-fmt", "taplo-fmt"]
description = "Run repository formatters"

[tasks.install-nightly]
run = "rustup toolchain install nightly --component rustfmt"

[tasks.check]
depends = [
"cargo-check",
Expand All @@ -40,9 +44,11 @@ description = "Run repository checks"
run = "cargo check --workspace"

[tasks.cargo-fmt]
depends = ["install-nightly"]
run = "cargo +nightly fmt"

[tasks.cargo-fmt-check]
depends = ["install-nightly"]
run = "cargo +nightly fmt -- --check"

[tasks.cargo-clippy]
Expand All @@ -58,6 +64,7 @@ run = "taplo lint"
run = "typos"

[tasks.osv-scanner]
depends = ["cargo-check"]
run = "osv-scanner --lockfile Cargo.lock"

[tasks.ws-server]
Expand Down
Loading