From 9d7c75c1b552ff25757f7ff378d9a890405f02fa Mon Sep 17 00:00:00 2001 From: Minoru Osuka Date: Thu, 12 Dec 2024 21:31:16 +0900 Subject: [PATCH] Fix workflows --- .github/workflows/periodic.yml | 6 ---- .github/workflows/regression.yml | 9 ------ .github/workflows/release.yml | 53 +++++++++++++++++++++++++++----- 3 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.github/workflows/periodic.yml b/.github/workflows/periodic.yml index 3342d78..eb09384 100644 --- a/.github/workflows/periodic.yml +++ b/.github/workflows/periodic.yml @@ -30,11 +30,5 @@ jobs: - name: Install wasm-pack run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "22" - cache: npm - - name: Run test run: wasm-pack test ${{ matrix.platform.test-runner }} diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 662f06e..6c0ea15 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -79,14 +79,5 @@ jobs: - name: Install wasm-pack run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh - # - name: Setup Node.js - # uses: actions/setup-node@v4 - # with: - # node-version: "22" - # cache: npm - - # - name: Install dependencies without lock file - # run: npm install - - name: Run test run: wasm-pack test ${{ matrix.platform.test-runner }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c5b9873..576e1da 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,6 +11,52 @@ permissions: contents: read jobs: + fmt: + name: Format + strategy: + matrix: + platform: + - runner: ubuntu-latest + target: x86_64 + toolchain: [stable] + features: [cjk] + runs-on: ${{ matrix.platform.runner }} + steps: + - name: Run checkout + uses: actions/checkout@v4 + + - name: Install toolchain + uses: dtolnay/rust-toolchain@v1 + with: + toolchain: ${{ matrix.toolchain }} + components: rustfmt, clippy + + - name: Check format + run: cargo fmt --all -- --check + + check: + name: Check + strategy: + matrix: + platform: + - runner: ubuntu-latest + target: x86_64 + toolchain: [stable] + features: [cjk] + runs-on: ${{ matrix.platform.runner }} + steps: + - name: Run checkout + uses: actions/checkout@v4 + + - name: Install toolchain + uses: dtolnay/rust-toolchain@v1 + with: + toolchain: ${{ matrix.toolchain }} + components: rustfmt, clippy + + - name: Run check + run: cargo check --features "${{ matrix.features }}" + test: strategy: matrix: @@ -21,7 +67,6 @@ jobs: toolchain: [stable] features: [cjk] runs-on: ${{ matrix.platform.runner }} - steps: - name: Run checkout uses: actions/checkout@v4 @@ -36,12 +81,6 @@ jobs: - name: Install wasm-pack run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "22" - cache: npm - - name: Run test run: wasm-pack test ${{ matrix.platform.test-runner }}