Convert codebase to ESM #629
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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | |
name: CI | |
on: | |
push: | |
branches: ["master", "master-esm"] | |
pull_request: | |
branches: ["master", "master-esm"] | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
eslint: | |
name: "Eslint" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
- name: Cache pnpm store | |
uses: actions/cache@v4 | |
with: | |
path: | | |
node_modules | |
~/.pnpm-store | |
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm- | |
- name: Install Dependencies | |
run: | | |
corepack enable | |
pnpm install --frozen-lockfile | |
- name: Lint Eslint | |
run: pnpm run lint-ci-eslint | |
stylelint: | |
name: "Stylelint" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
- name: Cache pnpm store | |
uses: actions/cache@v4 | |
with: | |
path: | | |
node_modules | |
~/.pnpm-store | |
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm- | |
- name: Install Dependencies | |
run: | | |
corepack enable | |
pnpm install --frozen-lockfile | |
- name: Lint Stylelint | |
run: pnpm run lint-ci-style | |
build_and_tests: | |
name: "Build and Tests" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
- name: Cache pnpm store | |
uses: actions/cache@v4 | |
with: | |
path: | | |
node_modules | |
~/.pnpm-store | |
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm- | |
- name: Install Dependencies | |
run: | | |
corepack enable | |
pnpm install --frozen-lockfile | |
- name: Typecheck | |
run: pnpm run lint-ci-eslint | |
- name: Build Packages | |
run: pnpm run build | |
- name: Run Jest | |
run: pnpm run test |