From 8148bc7580cd501187301aaa0b55a77acbaa9136 Mon Sep 17 00:00:00 2001 From: Alberto Faria Date: Wed, 13 Dec 2023 14:56:35 +0000 Subject: [PATCH] CI: Run ./lint.sh Signed-off-by: Alberto Faria --- .github/workflows/lint.yml | 26 ++++++++++++++++++++++++++ .gitlab-ci.yml | 29 ----------------------------- 2 files changed, 26 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/lint.yml delete mode 100644 .gitlab-ci.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..8b7b033 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,26 @@ +name: Lint + +on: + - pull_request + - push + +jobs: + + lint: + name: Rust ${{ matrix.rust }} + runs-on: ubuntu-latest + strategy: + matrix: + rust: [ stable, "1.74" ] + steps: + + - uses: actions/checkout@v4 + + - name: Set Rust version + run: rustup default ${{ matrix.rust }} + + - name: Install cargo-fmt and cargo-clippy + run: rustup component add rustfmt clippy + + - name: Lint + run: ./lint.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index d4dabc3..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,29 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-or-later - -.test: - only: - - branches - - merge_requests - tags: - - saas-linux-medium-amd64 - -rust-stable: - extends: .test - image: rust:latest - before_script: - - rustup component add clippy rustfmt - script: - - ./lint.sh - -rust-1.74: - extends: rust-stable - image: rust:1.74 - -minimum-dependency-versions: - extends: .test - image: rust:1.74 - before_script: - - rustup toolchain add nightly - - cargo +nightly install cargo-hack cargo-minimal-versions --locked - script: - - cargo minimal-versions check --workspace