Improve packaging strategy, native ES Modules, and browser-first builds #264
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
# This is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the main branch | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# We'll run the tests on both Linux and OSX | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-latest] # , macos-latest] # Too slow :( | |
# The type of runner that the job will run on | |
runs-on: ${{matrix.platform}} | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Setup Docker (macOS) | |
uses: docker-practice/[email protected] | |
if: matrix.platform == 'macos-latest' | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Yarn cache | |
uses: actions/cache@v3 | |
with: | |
path: "**/.yarn/cache" | |
key: ${{ hashFiles('**/yarn.lock') }} | |
- name: Install dependencies | |
run: yarn install --immutable | |
env: | |
YARN_ENABLE_SCRIPTS: 0 | |
- name: EMSDK cache | |
uses: actions/cache@v3 | |
with: | |
path: "emsdk-cache" | |
key: ${{ hashFiles('scripts/emcc.sh') }} | |
- name: Build | |
run: yarn build | |
- name: Check types | |
run: yarn check:types | |
- name: Test | |
run: yarn test:slow | |
- name: Test release with NodeJS/Typescript example | |
run: yarn smoketest-node | |
- name: Test release with create-react-app/Typescript example | |
run: yarn smoketest-cra | |
- name: Check format | |
run: yarn check:format |