64 lines
1.5 KiB
YAML
64 lines
1.5 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 10
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
deno: ["v1.x", "canary"]
|
|
os: [macOS-latest, windows-latest, ubuntu-latest]
|
|
include:
|
|
- os: ubuntu-latest
|
|
cache_path: ~/.cache/deno/
|
|
- os: macos-latest
|
|
cache_path: ~/Library/Caches/deno/
|
|
- os: windows-latest
|
|
cache_path: ~\AppData\Local\deno\
|
|
|
|
steps:
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Deno
|
|
uses: denoland/setup-deno@v1
|
|
with:
|
|
deno-version: ${{ matrix.deno }}
|
|
|
|
- name: Verify formatting
|
|
run: deno fmt --check
|
|
|
|
- name: Run linter
|
|
run: deno lint
|
|
|
|
- name: Spell-check
|
|
if: startsWith(matrix.os, 'ubuntu') && matrix.deno == 'canary'
|
|
uses: crate-ci/typos@master
|
|
|
|
- name: Cache dependencies and Chrome
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
${{ matrix.cache_path }}deps
|
|
${{ matrix.cache_path }}deno_puppeteer
|
|
key: ${{ runner.os }}-${{ hashFiles('**/*deps.ts', 'tests/fixture_twind_hydrate/twind.config.ts') }}
|
|
|
|
- name: Install Chromium
|
|
run: deno run -A --unstable https://deno.land/x/puppeteer@16.2.0/install.ts
|
|
env:
|
|
PUPPETEER_PRODUCT: chrome
|
|
|
|
- name: Type check project
|
|
run: deno task check:types
|
|
|
|
- name: Run tests
|
|
run: deno test -A --parallel
|