From 1a802d5c2bbdb19372882379f709e16150b15e91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= <joamag@gmail.com>
Date: Sun, 4 Dec 2022 13:21:35 +0000
Subject: [PATCH] fix: cargo fmt automation

---
 .github/workflows/main.yml | 18 ++++++++++++++++++
 .gitlab-ci.yml             |  2 +-
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 34b64ff1..5b9ad3c6 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -22,3 +22,21 @@ jobs:
       - run: cargo clippy
       - run: cargo build
       - run: cargo build --release
+  build-wasm:
+    name: Build WASM
+    timeout-minutes: 10
+    strategy:
+      matrix:
+        rust-version: ["1.56.1", "1.60.0", "1.65.0", "latest"]
+    runs-on: ubuntu-latest
+    container: rust:${{ matrix.rust-version }}
+    steps:
+      - uses: actions/checkout@v1
+      - run: |
+          rustup component add rustfmt
+          rustup component add clippy
+      - run: rustc --version
+      - run: cargo fmt --all -- --check
+      - run: cargo clippy
+      - run: cargo build
+      - run: cargo build --release
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9a83479b..6dac7a48 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -33,7 +33,7 @@ build-rust:
     - rustup component add rustfmt
     - rustup component add clippy
     - rustc --version
-    - cargo fmt --check
+    - cargo fmt --all -- --check
     - cargo clippy
     - cargo build
     - cargo build --release
-- 
GitLab