From e0523205dd826c9aca254e78a7d5a09a485f5463 Mon Sep 17 00:00:00 2001 From: eliassjogreen Date: Tue, 14 Jul 2020 23:10:00 +0200 Subject: [PATCH] fix: :sparkles: Deno 1.2.0 support --- .github/workflows/ci.yml | 24 ++++++++++++++++++------ mod.ts | 2 +- test.ts | 4 +++- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a6748b..830044c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,24 @@ -on: push -name: Test +name: ci + +on: [push, pull_request] + jobs: test: - name: test - runs-on: ubuntu-latest + name: ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 5 + strategy: + matrix: + os: [macOS-latest, windows-latest, ubuntu-latest] steps: - uses: actions/checkout@master - uses: denolib/setup-deno@master with: - deno-version: 1.0.2 - - run: deno test --allow-read + deno-version: 1.2.0 + + - run: deno -V + + - if: matrix.os == 'ubuntu-latest' + run: deno fmt --check + + - run: deno test test.ts \ No newline at end of file diff --git a/mod.ts b/mod.ts index 19d27d9..e75d27c 100644 --- a/mod.ts +++ b/mod.ts @@ -1,4 +1,4 @@ -import { dirname, join } from "https://deno.land/std@0.54.0/path/mod.ts"; +import { dirname, join } from "https://deno.land/std@0.61.0/path/mod.ts"; type AsyncFunction = (...params: S) => Promise; type MaybeAsyncFunction = (...params: S) => T | Promise; diff --git a/test.ts b/test.ts index 6d33625..deb0a59 100644 --- a/test.ts +++ b/test.ts @@ -1,7 +1,7 @@ import { assert, assertEquals, -} from "https://deno.land/std@0.54.0/testing/asserts.ts"; +} from "https://deno.land/std@0.61.0/testing/asserts.ts"; import { parry } from "./mod.ts"; @@ -186,6 +186,7 @@ test({ const r = await p.run( (async () => { + // deno-lint-ignore ban-ts-comment // @ts-ignore return value; }), @@ -206,6 +207,7 @@ test({ const r = await p.run( (async () => { + // deno-lint-ignore ban-ts-comment // @ts-ignore return add(1, 1); }),