summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2021-03-08 22:51:38 +0000
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2021-03-12 11:56:10 +0000
commit222245038cb3989bc6bcdfb6735bfb1e1017b71a (patch)
treee056a21ca4d1175ea1bfcff5b2fabdeaebe9e879 /.github/workflows
parent041ba31f1b9fd9a88b5ffd2e5c06bd07e8a2abd8 (diff)
downloadmullvadvpn-222245038cb3989bc6bcdfb6735bfb1e1017b71a.tar.xz
mullvadvpn-222245038cb3989bc6bcdfb6735bfb1e1017b71a.zip
Add workflow for checking Rust formatting
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/rustfmt.yml28
1 files changed, 28 insertions, 0 deletions
diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml
new file mode 100644
index 0000000000..3f95dfda3e
--- /dev/null
+++ b/.github/workflows/rustfmt.yml
@@ -0,0 +1,28 @@
+name: Rust formatting check CI
+on:
+ # Check whenever a file that affects Rust formatting is changed by a push
+ push:
+ paths:
+ - .github/workflows/rustfmt.yml
+ - rustfmt.toml
+ - '**/*.rs'
+ # Check if requested manually from the Actions tab
+ workflow_dispatch:
+jobs:
+ check-formatting:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ - name: Install nightly Rust
+ uses: ATiltedTree/setup-rust@v1.0.4
+ with:
+ rust-version: nightly
+ components: rustfmt
+
+ - name: Check formatting
+ run: |
+ rustfmt --version
+ cargo fmt -- --check --unstable-features
+