From 41ec5d30019c07d7a0c4d3a04f5bee016adb6d91 Mon Sep 17 00:00:00 2001 From: akagiyuu Date: Fri, 19 Dec 2025 13:46:23 +0700 Subject: [PATCH 1/4] feat(cd): add clippy and rustfmt check --- .github/workflows/check.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/check.yaml diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml new file mode 100644 index 0000000..3bc81be --- /dev/null +++ b/.github/workflows/check.yaml @@ -0,0 +1,24 @@ +on: + workflow_dispatch: + push: + branches: main + pull_request: + branches: main + +permissions: + contents: read + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + components: clippy, rustfmt + - uses: Swatinem/rust-cache@v2 + - name: Check clippy + run: cargo clippy --workspace -- -D warnings + - name: Check rustfmt + run: cargo fmt --all -- --check From d857ee0481a6b468c2813294ac1fc064ae918812 Mon Sep 17 00:00:00 2001 From: akagiyuu Date: Fri, 19 Dec 2025 13:50:30 +0700 Subject: [PATCH 2/4] feat(cd): add test --- .github/workflows/test.yaml | 50 +++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..792b706 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,50 @@ +on: + workflow_dispatch: + push: + branches: main + pull_request: + branches: main + +permissions: + contents: read + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + target: x86_64-unknown-linux-gnu + toolchain: stable + + - os: ubuntu-latest + target: x86_64-unknown-linux-gnu + toolchain: nightly + steps: + - uses: actions/checkout@v4 + + - name: Install toolchain + uses: dtolnay/rust-toolchain@master + with: + target: ${{ matrix.target }} + toolchain: ${{ matrix.toolchain }} + components: llvm-tools-preview + + - uses: Swatinem/rust-cache@v2 + + - name: Install cargo nextest + uses: taiki-e/install-action@nextest + + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + + - name: Install dependencies + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: openjdk-8-jdk build-essential python3 python-is-python3 libseccomp-dev libgbm-dev libxkbcommon-x11-0 pkg-config rustc + + - name: Run test + run: | + cargo llvm-cov nextest --target ${{ matrix.target }} From 13f9f6f85047296eb0626e5a6a4e6b65db7509bd Mon Sep 17 00:00:00 2001 From: akagiyuu Date: Fri, 19 Dec 2025 13:57:53 +0700 Subject: [PATCH 3/4] fix(cd/test): pass if there are no test --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 792b706..43ee608 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -47,4 +47,4 @@ jobs: - name: Run test run: | - cargo llvm-cov nextest --target ${{ matrix.target }} + cargo llvm-cov nextest --no-test pass --target ${{ matrix.target }} From 644cf6f10ca4d3e4fc8f64239b2ca55111cce639 Mon Sep 17 00:00:00 2001 From: akagiyuu Date: Fri, 19 Dec 2025 13:59:02 +0700 Subject: [PATCH 4/4] fix(cd/test): correct --no-tests flag --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 43ee608..fc083a8 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -47,4 +47,4 @@ jobs: - name: Run test run: | - cargo llvm-cov nextest --no-test pass --target ${{ matrix.target }} + cargo llvm-cov nextest --no-tests pass --target ${{ matrix.target }}