forked from evanw/esbuild
-
Notifications
You must be signed in to change notification settings - Fork 1
152 lines (115 loc) · 3.88 KB
/
ci.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: CI
on:
push:
branches: ['*']
pull_request:
branches: ['*']
jobs:
esbuild:
name: esbuild CI
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: 1.18.0
id: go
- name: Setup Node.js environment
uses: actions/setup-node@v1.4.4
with:
node-version: 16
- name: Setup Deno 1.x
uses: denoland/setup-deno@main
with:
deno-version: v1.x
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: go test
run: go test -race ./internal/...
- name: go vet
run: go vet ./cmd/... ./internal/... ./pkg/...
- name: Deno Tests
# Deno tests currently don't run on Windows because of "esbuild" vs.
# "esbuild.exe" in the test harness. This should be fixed...
if: matrix.os != 'windows-latest'
run: make test-deno
- name: Test for path/filepath
if: matrix.os == 'ubuntu-latest'
run: make no-filepath
- name: Make sure "check-go-version" works
if: matrix.os != 'windows-latest'
run: make check-go-version
- name: go fmt
if: matrix.os == 'macos-latest'
run: make fmt-go
- name: npm ci
run: cd scripts && npm ci
- name: Register Test (ESBUILD_WORKER_THREADS=0)
if: matrix.os != 'windows-latest'
run: ESBUILD_WORKER_THREADS=0 node scripts/register-test.js
- name: Register Test
run: node scripts/register-test.js
- name: Verify Source Map
run: node scripts/verify-source-map.js
- name: E2E Tests
run: node scripts/end-to-end-tests.js
- name: JS API Tests (ESBUILD_WORKER_THREADS=0)
if: matrix.os != 'windows-latest'
run: ESBUILD_WORKER_THREADS=0 node scripts/js-api-tests.js
- name: JS API Tests
run: node scripts/js-api-tests.js
- name: NodeJS Unref Tests
run: node scripts/node-unref-tests.js
- name: Plugin Tests
run: node scripts/plugin-tests.js
- name: TypeScript Type Definition Tests
if: matrix.os == 'ubuntu-latest'
run: node scripts/ts-type-tests.js
- name: JS API Type Check
if: matrix.os == 'ubuntu-latest'
run: make lib-typecheck
- name: WebAssembly API Tests (browser)
if: matrix.os == 'ubuntu-latest'
run: make test-wasm-browser
- name: WebAssembly API Tests (node)
if: matrix.os == 'ubuntu-latest'
run: make test-wasm-node
- name: WebAssembly API Tests (node)
if: matrix.os != 'ubuntu-latest'
run: node scripts/wasm-tests.js
- name: Sucrase Tests
if: matrix.os == 'ubuntu-latest'
run: make test-sucrase
- name: Esprima Tests
if: matrix.os == 'ubuntu-latest'
run: make test-esprima
- name: Preact Splitting Tests
if: matrix.os == 'ubuntu-latest'
run: make test-preact-splitting
- name: Uglify Tests
if: matrix.os == 'ubuntu-latest'
run: CI=1 make uglify
- name: Rollup Tests
if: matrix.os == 'ubuntu-latest'
run: make test-rollup
- name: Check the unicode table generator
if: matrix.os == 'ubuntu-latest'
run: cd scripts && node gen-unicode-table.js
esbuild-old-golang:
name: esbuild CI (old Go version)
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13 (the minimum required Go version for esbuild)
uses: actions/setup-go@v2
with:
go-version: 1.13
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: go build
run: go build ./cmd/esbuild
- name: go test
run: go test ./internal/...