Skip to content

Update create-spectacle to use import map and ESM-based one page template. #690

Update create-spectacle to use import map and ESM-based one page template.

Update create-spectacle to use import map and ESM-based one page template. #690

Workflow file for this run

name: CI
# Runs build and test on:
# every push that has a change in a file not in the docs folder
# every pull request with main branch as the base that has a change
# in a file not in the docs folder
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Check and build codebase
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
# Wireit cache
- uses: google/wireit@setup-github-actions-caching/v1
- uses: pnpm/[email protected]
with:
version: 7
- name: Get pnpm store directory
id: pnpm-cache
run: echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('./pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
# If you hare having issues post-merge with wireit improperly caching,
# comment this out, push a commit, then re-comment.
# - name: Clear all caches
# run: pnpm clean:cache
- name: Build Code and Examples ${{ matrix.node-version }}
run: pnpm run build
# We build in-source files like `examples/one-page/index.html`.
# This check ensures we don't build changes that need committing.
- name: Check generated in-source files
run: git diff --no-ext-diff --quiet --exit-code
- name: Check Code ${{ matrix.node-version }}
run: pnpm run check:ci