Skip to content

Commit

Permalink
Merge pull request #2 from lambdalisue/up
Browse files Browse the repository at this point in the history
🆙 Upgrade dependencies and supported Deno version
  • Loading branch information
lambdalisue authored Nov 14, 2022
2 parents d26eb1c + 1bd403c commit 8610de6
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 50 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
70 changes: 34 additions & 36 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: Test

env:
DENO_VERSION: 1.x

on:
schedule:
- cron: "0 7 * * 0"
Expand All @@ -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
5 changes: 3 additions & 2 deletions .github/workflows/udd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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: |
Expand All @@ -47,3 +47,4 @@ jobs:
labels: automation
branch: automation/update-dependencies
delete-branch: true
token: "${{ secrets.PA_TOKEN }}"
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]/main.ts ${TARGETS}
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_npm.ts
Original file line number Diff line number Diff line change
@@ -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];
Expand Down
2 changes: 1 addition & 1 deletion unnullish_test.ts
Original file line number Diff line number Diff line change
@@ -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/[email protected]/mod.ts";
import { unnullish } from "./unnullish.ts";

Expand Down

0 comments on commit 8610de6

Please sign in to comment.