diff --git a/.github/workflows/deno.yml b/.github/workflows/deno.yml index 5be72db..9baaca2 100644 --- a/.github/workflows/deno.yml +++ b/.github/workflows/deno.yml @@ -3,27 +3,41 @@ name: Deno on: push: pull_request: + workflow_dispatch: jobs: denofmt-and-lint: runs-on: ubuntu-latest + timeout-minutes: 15 steps: - - uses: denoland/setup-deno@v1 + - uses: denoland/setup-deno@v2 with: - deno-version: v1.x + deno-version: v2.x - uses: actions/checkout@v4 - run: deno lint - run: deno fmt --check - test: + check: runs-on: ubuntu-latest + timeout-minutes: 15 steps: - - uses: denoland/setup-deno@v1 + - uses: denoland/setup-deno@v2 with: - deno-version: v1.x + deno-version: v2.x - uses: actions/checkout@v4 - run: deno cache *.ts - run: deno check *.ts - - run: deno test --allow-read + + test: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: denoland/setup-deno@v2 + with: + deno-version: v2.x + - uses: actions/checkout@v4 + + - run: deno cache *.ts + - run: deno test --no-check --allow-read diff --git a/deno.jsonc b/deno.jsonc index 7757a76..20f55ae 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -1,19 +1,20 @@ { // https://deno.land/manual/getting_started/configuration_file "lock": false, - "tasks": {}, // https://deno.land/manual/advanced/typescript/configuration // https://www.typescriptlang.org/tsconfig/ "compilerOptions": { - "noFallthroughCasesInSwitch": true, "noImplicitOverride": true, "noImplicitReturns": true, "noPropertyAccessFromIndexSignature": true, "noUncheckedIndexedAccess": true, - "noUnusedLocals": true, - "noUnusedParameters": true, "useUnknownInCatchVariables": true }, + "fmt": { + "exclude": ["README.md"], + "proseWrap": "preserve", + "useTabs": true + }, "lint": { "rules": { // https://lint.deno.land/?all=on @@ -23,12 +24,13 @@ "eqeqeq", "explicit-module-boundary-types", "no-await-in-loop", - "no-eval" + "no-eval", + "no-non-null-asserted-optional-chain", + "no-non-null-assertion", + "no-slow-types", + "no-sparse-arrays", + "verbatim-module-syntax" ] } - }, - "fmt": { - "exclude": ["README.md"], - "useTabs": true } }