Skip to content

Enable both CJS and ESM builds #44

Enable both CJS and ESM builds

Enable both CJS and ESM builds #44

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- '*'
pull_request: {}
jobs:
test:
timeout-minutes: 5
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
node: ['16', '18']
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
with:
node-version: ${{ matrix.node }}
- uses: actions/cache@v2
id: yarn-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: yarn --frozen-lockfile
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
- name: yarn prepare
if: steps.yarn-cache.outputs.cache-hit == 'true'
run: yarn prepare
- run: yarn lint
- run: yarn test