From bb893775fa736a03b42e8117d042b37b1a72820f Mon Sep 17 00:00:00 2001 From: Alisue Date: Tue, 15 Nov 2022 00:53:08 +0900 Subject: [PATCH 1/2] Upgrade dependencies --- scripts/build_npm.ts | 2 +- unnullish_test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build_npm.ts b/scripts/build_npm.ts index 1dbb41f..b5db89b 100644 --- a/scripts/build_npm.ts +++ b/scripts/build_npm.ts @@ -1,4 +1,4 @@ -import { build, emptyDir } from "https://deno.land/x/dnt@0.21.0/mod.ts"; +import { build, emptyDir } from "https://deno.land/x/dnt@0.31.0/mod.ts"; const name = "unnullish"; const version = Deno.args[0]; diff --git a/unnullish_test.ts b/unnullish_test.ts index 40a1221..887e5d5 100644 --- a/unnullish_test.ts +++ b/unnullish_test.ts @@ -1,4 +1,4 @@ -import { assertEquals } from "https://deno.land/std@0.150.0/testing/asserts.ts"; +import { assertEquals } from "https://deno.land/std@0.164.0/testing/asserts.ts"; import { unreachable } from "https://deno.land/x/unreachable@v0.1.0/mod.ts"; import { unnullish } from "./unnullish.ts"; From 1bd403c2178cc7da5afa3ffc30cce58e6fc93dd1 Mon Sep 17 00:00:00 2001 From: Alisue Date: Tue, 15 Nov 2022 01:04:42 +0900 Subject: [PATCH 2/2] Refine GHA and Makefile --- .github/workflows/npm.yml | 10 +++--- .github/workflows/test.yml | 70 ++++++++++++++++++-------------------- .github/workflows/udd.yml | 5 +-- Makefile | 10 +++--- 4 files changed, 47 insertions(+), 48 deletions(-) diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index e75ca82..a6e1c81 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -7,22 +7,22 @@ env: on: push: tags: - - 'v*' + - "v*" jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - - uses: denoland/setup-deno@main + - uses: denoland/setup-deno@v1 with: deno-version: ${{ env.DENO_VERSION }} - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v3 with: node-version: ${{ env.NODE_VERSION }} - registry-url: 'https://registry.npmjs.org' + registry-url: "https://registry.npmjs.org" - name: Build run: make build-npm - name: Publish diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2ab9b7..59c1619 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" @@ -14,46 +11,47 @@ on: - main jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@main - with: - deno-version: ${{ env.DENO_VERSION }} - - name: Lint - run: deno lint - - format: - 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: Format + deno-version: "${{ matrix.version }}" + - name: Lint check + run: | + make lint + - name: Format check + run: | + make fmt-check + - name: Type check run: | - deno fmt --check + 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 b8bafdf..b037193 100644 --- a/.github/workflows/udd.yml +++ b/.github/workflows/udd.yml @@ -9,7 +9,7 @@ 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" @@ -35,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: | @@ -47,3 +47,4 @@ jobs: labels: automation branch: automation/update-dependencies delete-branch: true + token: "${{ secrets.PA_TOKEN }}" diff --git a/Makefile b/Makefile index ea74047..707c762 100644 --- a/Makefile +++ b/Makefile @@ -9,19 +9,19 @@ help: perl -pe 's/(.*):.*##\s*/sprintf("%-20s",$$1)/eg;' fmt: FORCE ## Format code - @deno fmt --ignore=.deno + @deno fmt fmt-check: FORCE ## Format check - @deno fmt --check --ignore=.deno + @deno fmt --check lint: FORCE ## Lint code - @deno lint --ignore=.deno + @deno lint type-check: FORCE ## Type check - @deno test --unstable --no-run ${TARGETS} + @deno test --no-run ${TARGETS} test: FORCE ## Test - @deno test --unstable -A --no-check --jobs + @deno test -A --no-check deps: FORCE ## Update dependencies @deno run -A https://deno.land/x/udd@0.7.2/main.ts ${TARGETS}