-
Notifications
You must be signed in to change notification settings - Fork 100
100 lines (78 loc) · 2.79 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# 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@v4
with:
# We need `git log` to find git-subtree versions
fetch-depth: 0
- 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: Environment info
run: |
echo $(which node) v$(node --version)
echo $(which yarn) v$(yarn --version)
echo $(which npx) v$(npx --version)
echo $(npx which tsc) $(npx tsc --version)
echo $(npx which tsup) $(npx tsup --version)
echo $(npx which esbuild) v$(npx esbuild --version)
- name: Build
run: yarn build
- name: Check types
run: yarn check:types
- name: Check package.jsons
run: yarn check:packages
- name: Test
run: yarn test:slow
- name: Build tarballs
run: yarn tarball && du -h build/tar/*
- name: Test release with NodeJS minimal ESModule example
run: ./scripts/smoketest-node-minimal.ts
- name: Test release with NodeJS/Typescript example
run: ./scripts/smoketest-node.ts
- name: Test release with create-react-app/Typescript example
run: ./scripts/smoketest-create-react-app.ts
- name: Test release with Vite/Vue example
run: ./scripts/smoketest-vite.ts
- name: Check lint
run: yarn lint
- name: Check format
run: yarn check:format