diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml deleted file mode 100644 index a93344b..0000000 --- a/.github/workflows/CI.yml +++ /dev/null @@ -1,55 +0,0 @@ -on: - push: - branches: [main] - pull_request: - -name: CI - -jobs: - check: - name: Build - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - run: sudo apt install -y libparted-dev libclang-dev - - uses: actions-rs/cargo@v1 - with: - command: build - - fmt: - name: rustfmt - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - components: rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - - clippy: - name: Clippy - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - components: clippy - - run: sudo apt install -y libparted-dev libclang-dev - - uses: actions-rs/cargo@v1 - with: - command: clippy - args: -- -D warnings diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..8f3805f --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,20 @@ +--- + +stages: + - test + +tests: + stage: test + image: fedora:latest + before_script: + - dnf install -y cargo rustfmt clippy parted-devel clang-devel + script: + - cargo build --release + - cargo fmt --all -- --check + # Audit fails, reported: https://gitlab.com/CentOS/automotive/src/cvd2img/-/issues/3 + # TODO: re-enable once fixed + # - cargo install cargo-audit + # - cargo audit + # Clippy fails, reported: https://gitlab.com/CentOS/automotive/src/cvd2img/-/issues/2 + # TODO: re-enable once fixed + # - cargo clippy -- -D warnings