From 2fe995ddbf6bb20f2e6b89deac2df3bd9536195f Mon Sep 17 00:00:00 2001
From: Volkor Barbarian Warrior <me@volkor.me>
Date: Wed, 5 Jun 2024 00:58:29 +0000
Subject: [PATCH] Update .gitlab-ci.yml file

---
 .gitlab-ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..cbfbc8d
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,42 @@
+stages:
+  - lint
+  - build
+  - test
+
+variables:
+  CARGO_HOME: $CI_PROJECT_DIR/cargo
+  RUST_BACKTRACE: FULL
+  # Faster caching :)   
+  FF_USE_FASTZIP: "true"
+  CACHE_COMPRESSION_LEVEL: "fastest"
+
+# Linting
+cargo-fmt:
+  stage: lint
+  image: rust:latest
+  script:
+    - rustup component add rustfmt
+    - cargo fmt -- --check
+
+clippy:
+  stage: lint
+  image: rust:latest
+  script:
+    - rustup component add clippy
+    - cargo clippy -- -D warnings # Turn all warnings into errors
+
+# Building
+rust-stable:
+  stage: build
+  image: rust:stable
+  script:
+    - rustc --version && cargo --version
+    - cargo build --verbose
+
+# Testing
+test:
+  stage: test
+  image: rust:stable
+  script:
+    - rustc --version && cargo --version
+    - cargo test --verbose
-- 
GitLab