Browse Source

CI: rust.yml fixed inconsistent formatting

Philipp Schuster 2 years ago
parent
commit
3f60db152b
2 changed files with 36 additions and 35 deletions
  1. 3 0
      .editorconfig
  2. 33 35
      .github/workflows/rust.yml

+ 3 - 0
.editorconfig

@@ -9,3 +9,6 @@ insert_final_newline = true
 indent_style = space
 indent_style = space
 indent_size = 4
 indent_size = 4
 trim_trailing_whitespace = true
 trim_trailing_whitespace = true
+
+[*.yml]
+indent_size = 2

+ 33 - 35
.github/workflows/rust.yml

@@ -13,48 +13,46 @@ jobs:
   build:
   build:
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     strategy:
     strategy:
-        matrix:
+      matrix:
-            rust:
+        rust:
-                - stable
+          - stable
-                - nightly
+          - nightly
-                - 1.52.1 # MSVR
+          - 1.52.1 # MSVR
     steps:
     steps:
-    - uses: actions/checkout@v2
+      - uses: actions/checkout@v2
-    - name: Build
+      - name: Build
-      run: cargo build --verbose
+        run: cargo build --verbose
-    - name: Run tests
+      - name: Run tests
-      run: cargo test --verbose
+        run: cargo test --verbose
 
 
   build_no_std:
   build_no_std:
-      runs-on: ubuntu-latest
+    runs-on: ubuntu-latest
-      strategy:
+    strategy:
-          matrix:
+      matrix:
-              rust:
+        rust:
-                  - stable
+          - stable
-                  - nightly
+          - nightly
-                  - 1.52.1 # MSVR
+          - 1.52.1 # MSVR
-      steps:
+    steps:
-          -   uses: actions/checkout@v2
+      - uses: actions/checkout@v2
-          -   name: "Rustup: install some no_std target"
+      - name: "Rustup: install some no_std target"
-              run: rustup target add thumbv7em-none-eabihf
+        run: rustup target add thumbv7em-none-eabihf
-          -   name: Build (no_std)
+      - name: Build (no_std)
-              run: cargo build --target thumbv7em-none-eabihf
+        run: cargo build --target thumbv7em-none-eabihf
 
 
 
 
   # As discussed, these tasks are optional for PRs.
   # As discussed, these tasks are optional for PRs.
   style_checks:
   style_checks:
-
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     strategy:
     strategy:
-        matrix:
+      matrix:
-            rust:
+        rust:
-                - stable
+          - stable
-
     steps:
     steps:
-    - uses: actions/checkout@v2
+      - uses: actions/checkout@v2
-    - name: Rustfmt
+      - name: Rustfmt
-      run: cargo fmt -- --check
+        run: cargo fmt -- --check
-    - name: Clippy
+      - name: Clippy
-      run: cargo clippy
+        run: cargo clippy
-    - name: Rustdoc
+      - name: Rustdoc
-      run: cargo doc
+        run: cargo doc