Skip to content

Add ESM support

Add ESM support #33

Workflow file for this run

name: checks
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened]
branches: [main]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
jobs:
# test:
# strategy:
# fail-fast: false
# matrix:
# os: [ubuntu-latest, windows-latest, macos-latest]
# name: test (${{ matrix.os }})
# runs-on: ${{ matrix.os }}
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Setup pnpm
# uses: ./.github/actions/setup-pnpm
# - name: Run tests with xvfb
# uses: coactions/setup-xvfb@v1
# with:
# run: pnpm test
lint:
name: ${{ matrix.script }}
strategy:
fail-fast: false
matrix:
script: [lint, typecheck, knip]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup pnpm
uses: ./.github/actions/setup-pnpm
- name: Build
if: ${{ matrix.script == 'typecheck' }}
run: pnpm run build
- name: Run ${{ matrix.script }}
run: pnpm run ${{ matrix.script }}
format:
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup pnpm
uses: ./.github/actions/setup-pnpm
- name: Format
run: pnpm run format
- name: Commit changes
if: ${{ always() }}
uses: stefanzweifel/git-auto-commit-action@v5