ci(tooling): use src dir #13
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: Deno | |
# This workflow will install Deno then run `deno fmt`, `deno lint`, and `deno test`. | |
# For more information see: https://github.com/denoland/setup-deno | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
types: | |
- opened | |
- synchronize | |
- reopened | |
merge_group: | |
schedule: | |
- cron: "0 14 * * 1" # every monday at 9 in the morning CST | |
workflow_dispatch: | |
permissions: | |
contents: read | |
env: | |
CI: true | |
DENO_DIR: .deno | |
DENO_VERSION: v1.39.x | |
jobs: | |
test: | |
name: CI | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📚 Git checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
submodules: recursive | |
clean: true | |
persist-credentials: false | |
set-safe-directory: true | |
- name: 🦕 Setup Deno | |
uses: denoland/setup-deno@0df5d9c641efdff149993c321fc27c11c5df8623 # v1.1.3 | |
with: | |
deno-version: ${{ env.DENO_VERSION }} | |
- name: ⚙️ Cache Deno dependencies | |
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 | |
with: | |
path: ${{ env.DENO_DIR }} | |
key: deno_cache-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('deno.json') }} | |
restore-keys: deno_cache-${{ runner.arch }}-${{ runner.os }} | |
- name: 📦 Install dependencies | |
run: deno cache src/dev.ts | |
- name: 🕵️ Run linter, Verify formatting | |
run: deno task check | |
- name: 🧪 Run tests | |
run: deno task test | |
- name: 📊 Collect coverage | |
run: deno task test:coverage |