Fix build interface #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: [main] | |
paths: | |
- '**.ts' | |
- 'deno.json' | |
- 'deno.lock' | |
- '.github/workflows/test.yml' | |
pull_request: | |
branches: [main] | |
paths: | |
- '**.ts' | |
- 'deno.json' | |
- 'deno.lock' | |
- '.github/workflows/test.yml' | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Deno | |
uses: denoland/setup-deno@v2 | |
with: | |
deno-version: v2.1.0 | |
- name: Restore cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.deno | |
~/.cache/deno | |
key: ${{ runner.os }}-deno-${{ hashFiles('deno.lock') }} | |
restore-keys: | | |
${{ runner.os }}-deno- | |
- name: Verify formatting | |
run: deno fmt --check | |
- name: Run linter | |
run: deno lint | |
- name: Type check | |
run: | | |
deno check src/ | |
- name: Run tests | |
run: deno test --allow-read | |
- name: Cache dependencies | |
if: hashFiles('deps.ts') != '' | |
run: | | |
deno cache --lock=deno.lock deps.ts |