Files
sweet/.github/workflows/ci.yml
T
Asher GomezandLuca Casonato 1b6678951a feat: support embedded import map in deno.json (#1188)
One can now inline the `imports` and `scopes` from the import map directly into deno.json.

For new projects, `import_map.json` is not generated anymore.

Co-authored-by: Luca Casonato <hello@lcas.dev>
2023-06-03 10:46:40 +02:00

96 lines
2.9 KiB
YAML

name: ci
on:
push:
branches: [main]
paths-ignore: [www/**]
pull_request:
branches: [main]
paths-ignore: [www/**]
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]
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno }}
- name: Verify formatting
if: startsWith(matrix.os, 'ubuntu') && matrix.deno == 'v1.x'
run: deno fmt --check
- name: Run linter
if: startsWith(matrix.os, 'ubuntu') && matrix.deno == 'canary'
run: deno lint
- name: Cache dependencies
if: startsWith(matrix.os, 'ubuntu') && matrix.deno == 'v1.x'
run: deno cache --config=www/deno.json src/dev/deps.ts src/server/deps.ts www/main.ts
- name: Cache Chrome (Linux)
if: startsWith(matrix.os, 'ubuntu')
uses: actions/cache@v3
with:
path: ~/.cache/deno/deno_puppeteer
key: chrome-1022525-${{ runner.os }}-${{ hashFiles('tests/deps.ts') }}
restore-keys: chrome-1022525-${{ runner.os }}-
- name: Cache Chrome (macOS)
if: startsWith(matrix.os, 'mac')
uses: actions/cache@v3
with:
path: ~/Library/Caches/deno/deno_puppeteer
key: chrome-1022525-${{ runner.os }}-${{ hashFiles('tests/deps.ts') }}
restore-keys: chrome-1022525-${{ runner.os }}-
- name: Cache Chrome (Windows)
if: startsWith(matrix.os, 'win')
uses: actions/cache@v3
with:
path: "C:\\Users\\RUNNER~1\\AppData\\Local\\deno\\deno_puppeteer"
key: chrome-1022525-${{ runner.os }}-${{ hashFiles('tests/deps.ts') }}
restore-keys: chrome-1022525-${{ runner.os }}-
- name: Install Chromium (Unix)
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'mac')
run: PUPPETEER_PRODUCT=chrome deno run -A --unstable https://deno.land/x/puppeteer@16.2.0/install.ts
- name: Install Chromium (Windows)
if: startsWith(matrix.os, 'windows')
run: set "PUPPETEER_PRODUCT=chrome" && deno run -A --unstable https://deno.land/x/puppeteer@16.2.0/install.ts
- name: Run tests
run: deno test -A
- name: Type check init script
run: deno check --remote init.ts
- name: Type check website
run: deno check main.ts dev.ts
working-directory: www/
- name: Type check demo
run: deno check --remote main.ts dev.ts
working-directory: demo
- name: Type check tests/fixture
run: deno check main.ts dev.ts
working-directory: tests/fixture/
- name: Type check tests/fixture_error
run: deno check main.ts dev.ts
working-directory: tests/fixture_error/