summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorMatthieuCoder <matthieu@matthieu-dev.xyz>2023-01-03 14:56:36 +0400
committerMatthieuCoder <matthieu@matthieu-dev.xyz>2023-01-03 14:56:36 +0400
commitf0cf9d95971b46f2219cbba2cf4dd7d52a606d88 (patch)
tree150c877e4c02f37aa3fef0e297b8af562c22084a /.github
parent27cb69cc6c30641abc6ccdf7dde19ea6c189d543 (diff)
add ci
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml61
-rw-r--r--.github/workflows/rust.yml22
2 files changed, 61 insertions, 22 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..110d266
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,61 @@
+name: Rust
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+
+jobs:
+ lint:
+ name: Lint
+ runs-on: ubuntu-latest
+ steps:
+ - name: Setup | Checkout
+ uses: actions/checkout@v2
+ - name: Setup | Rust
+ uses: ATiltedTree/setup-rust@v1
+ with:
+ rust-version: stable
+ components: clippy
+ - name: Build | Lint
+ run: cargo clippy
+ compile:
+ name: Compile
+ runs-on: ubuntu-latest
+ steps:
+ - name: Setup | Checkout
+ uses: actions/checkout@v2
+ - name: Install Protoc
+ uses: arduino/setup-protoc@v1
+ - name: Setup | Rust
+ uses: ATiltedTree/setup-rust@v1
+ with:
+ rust-version: stable
+ - name: Build | Compile
+ run: cargo check
+ test:
+ name: Test
+ strategy:
+ matrix:
+ os:
+ - ubuntu-latest
+ - windows-latest
+ - macOS-latest
+ rust:
+ - stable
+ - beta
+ - nightly
+ runs-on: ${{ matrix.os }}
+ needs: [compile]
+ steps:
+ - name: Setup | Checkout
+ uses: actions/checkout@v2
+ - name: Install Protoc
+ uses: arduino/setup-protoc@v1
+ - name: Setup | Rust
+ uses: ATiltedTree/setup-rust@v1
+ with:
+ rust-version: ${{ matrix.rust }}
+ - name: Build | Compile
+ run: cargo test
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
deleted file mode 100644
index 31000a2..0000000
--- a/.github/workflows/rust.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-name: Rust
-
-on:
- push:
- branches: [ "main" ]
- pull_request:
- branches: [ "main" ]
-
-env:
- CARGO_TERM_COLOR: always
-
-jobs:
- build:
-
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v3
- - name: Build
- run: cargo build --verbose
- - name: Run tests
- run: cargo test --verbose