From 35c3b4a929be9d30c29e80d9354ec9305c8e1bb8 Mon Sep 17 00:00:00 2001 From: Alisue Date: Tue, 15 Nov 2022 01:56:39 +0900 Subject: [PATCH] Refine GHA --- .github/workflows/test.yml | 72 ++++++++++++++++++-------------------- .github/workflows/udd.yml | 7 ++-- 2 files changed, 37 insertions(+), 42 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2ab9b7..52373f6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,8 +1,5 @@ name: Test -env: - DENO_VERSION: 1.x - on: schedule: - cron: "0 7 * * 0" @@ -10,50 +7,49 @@ on: branches: - main pull_request: - branches: - - main jobs: - lint: - runs-on: ubuntu-latest + check: + strategy: + matrix: + runner: + - ubuntu-latest + version: + - "1.x" + - "1.28.x" + runs-on: ${{ matrix.runner }} steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@main + - uses: actions/checkout@v3 + - uses: denoland/setup-deno@v1 with: - deno-version: ${{ env.DENO_VERSION }} - - name: Lint - run: deno lint - - format: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@main - with: - deno-version: ${{ env.DENO_VERSION }} - - name: Format + deno-version: "${{ matrix.version }}" + - name: Lint check + run: | + make lint + - name: Format check run: | - deno fmt --check + make fmt-check + - name: Type check + run: | + make type-check test: - runs-on: ubuntu-latest + strategy: + matrix: + runner: + - windows-latest + - macos-latest + - ubuntu-latest + version: + - "1.x" + - "1.28.x" + runs-on: ${{ matrix.runner }} steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@main + - uses: actions/checkout@v3 + - uses: denoland/setup-deno@v1 with: - deno-version: ${{ env.DENO_VERSION }} + deno-version: "${{ matrix.version }}" - name: Test run: | - deno test + make test timeout-minutes: 5 - - typecheck: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@main - with: - deno-version: ${{ env.DENO_VERSION }} - - name: Type check - run: | - deno test --unstable --no-run ./*.ts diff --git a/.github/workflows/udd.yml b/.github/workflows/udd.yml index c48f16a..b037193 100644 --- a/.github/workflows/udd.yml +++ b/.github/workflows/udd.yml @@ -9,14 +9,13 @@ jobs: udd: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: denoland/setup-deno@v1 with: deno-version: "1.x" - name: Update dependencies run: | - make tools - make update > ../output.txt + make deps > ../output.txt env: NO_COLOR: 1 - name: Read ../output.txt @@ -36,7 +35,7 @@ jobs: ${{ steps.log.outputs.content }} EOM - - uses: peter-evans/create-pull-request@v3 + - uses: peter-evans/create-pull-request@v4 with: title: ":package: Update Deno dependencies" body: |