Fix default export returning undefined in ESM #403
Workflow file for this run
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
name: Test | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**.md' | |
- '**.ya?ml' | |
- '!pnpm-lock.yaml' | |
- '!.github/workflows/test.yml' | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- '**.md' | |
- '**.ya?ml' | |
- '!pnpm-lock.yaml' | |
- '!.github/workflows/test.yml' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Node.js ${{ matrix.node }} on ${{ matrix.os.name }} | |
runs-on: ${{ matrix.os.version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node: | |
- 14 | |
- 16 | |
- 18 | |
- 19 | |
os: | |
- name: Ubuntu | |
version: ubuntu-latest | |
- name: Windows | |
version: windows-latest | |
- name: macOS | |
version: macOS-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
# Bun does not currently fully support Windows: | |
# https://bun.sh/docs/installation#windows | |
- uses: oven-sh/setup-bun@v1 | |
if: ${{ matrix.os != 'windows-latest' }} | |
with: | |
bun-version: latest | |
- name: Setup pnpm | |
uses: ./.github/actions/setup-pnpm | |
- name: Install dependencies | |
run: pnpm install && pnpm add --global concurrently | |
- name: Build & Test | |
run: concurrently --prefix none --group "pnpm:build" "pnpm:test" | |
- name: Node import with CJS | |
run: node ./smoke-tests/smoke-test-cjs.cjs | |
- name: Node import with ESM | |
run: node ./smoke-tests/smoke-test-esm.mjs | |
- name: Bun import with CJS | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: bun ./smoke-tests/smoke-test-cjs.cjs | |
- name: Bun import with ESM | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: bun ./smoke-tests/smoke-test-esm.mjs | |
- name: Bun import with both CJS and ESM vis TS | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: bun ./smoke-tests/smoke-test.ts | |
- name: Submit coverage | |
uses: coverallsapp/github-action@master | |
continue-on-error: true | |
with: | |
github-token: ${{ secrets.github_token }} | |
flag-name: Node.js ${{ matrix.node }} on ${{ matrix.os.name }} | |
parallel: true | |
coverage: | |
name: Coverage | |
needs: test | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
steps: | |
- name: Finish coverage | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.github_token }} | |
parallel-finished: true |