From c2c58b00b4d6530c55116a328bc30de0baecfeb5 Mon Sep 17 00:00:00 2001 From: Frank Date: Mon, 21 Sep 2026 16:03:00 +0200 Subject: [PATCH 1/4] Add github action workflow --- .github/workflows/test_rust.yml | 61 +++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/test_rust.yml diff --git a/.github/workflows/test_rust.yml b/.github/workflows/test_rust.yml new file mode 100644 index 00000000..941617e9 --- /dev/null +++ b/.github/workflows/test_rust.yml @@ -0,0 +1,61 @@ +name: Test Rust + +on: + push: + branches: [main] + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: Test build ${{ matrix.rust_version }} - ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + rust_version: [1.88.0, stable] + os: [ubuntu-26.04, ubuntu-26.04-arm, windows-latest, windows-11-arm, macos-26-intel, macos-26] + + steps: + - uses: actions/checkout@v7 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.rust_version }} + + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose + - name: Run integration tests + run: cargo xtest + + lints: + name: Run lints ${{ matrix.rust_version }} - ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + rust_version: [1.88.0, stable] + os: [ubuntu-latest] + + steps: + - uses: actions/checkout@v7 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.rust_version }} + components: rustfmt, clippy + + - name: Check clippy + run: cargo clippy -- -D warnings + - name: Check formatting + run: cargo fmt --all -- --check From 4f081a7e445b2135059423e6b65f2d9b51ccbc83 Mon Sep 17 00:00:00 2001 From: Frank Date: Mon, 21 Sep 2026 16:19:50 +0200 Subject: [PATCH 2/4] Fix configuration directories not being created --- .github/workflows/test_rust.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/test_rust.yml b/.github/workflows/test_rust.yml index 941617e9..1656c306 100644 --- a/.github/workflows/test_rust.yml +++ b/.github/workflows/test_rust.yml @@ -33,6 +33,14 @@ jobs: run: cargo build --verbose - name: Run tests run: cargo test --verbose + + - name: Create Linux configuration directory + if: runner.os == 'Linux' + run: sudo mkdir /etc/packit + - name: Create macOS configuration directory + if: runner.os == 'macOS' + run: sudo mkdir "/Library/Application Support/packit" + - name: Run integration tests run: cargo xtest From d98578cc53793753bad4eed9930f05df434a4855 Mon Sep 17 00:00:00 2001 From: Frank Date: Mon, 21 Sep 2026 16:26:21 +0200 Subject: [PATCH 3/4] Only run lints on stable rust version --- .github/workflows/test_rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_rust.yml b/.github/workflows/test_rust.yml index 1656c306..6b588577 100644 --- a/.github/workflows/test_rust.yml +++ b/.github/workflows/test_rust.yml @@ -51,7 +51,7 @@ jobs: strategy: fail-fast: false matrix: - rust_version: [1.88.0, stable] + rust_version: [stable] os: [ubuntu-latest] steps: From 928aedd35da6a6cb33594f155772921614e92a90 Mon Sep 17 00:00:00 2001 From: Frank Date: Mon, 21 Sep 2026 16:39:34 +0200 Subject: [PATCH 4/4] Fix configuration directory permissions --- .github/workflows/test_rust.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_rust.yml b/.github/workflows/test_rust.yml index 6b588577..d1ecbf06 100644 --- a/.github/workflows/test_rust.yml +++ b/.github/workflows/test_rust.yml @@ -36,10 +36,12 @@ jobs: - name: Create Linux configuration directory if: runner.os == 'Linux' - run: sudo mkdir /etc/packit + run: sudo mkdir /etc/packit && sudo chown -R $UID /etc/packit - name: Create macOS configuration directory if: runner.os == 'macOS' - run: sudo mkdir "/Library/Application Support/packit" + run: | + sudo mkdir "/Library/Application Support/packit" && sudo chown -R $UID "/Library/Application Support/packit" + sudo mkdir "/opt/packit" && sudo chown -R $UID "/opt/packit" - name: Run integration tests run: cargo xtest