-
-
Notifications
You must be signed in to change notification settings - Fork 149
117 lines (107 loc) · 3.82 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
name: build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
#############################################################################
# NODE
node:
runs-on: ubuntu-latest
strategy:
matrix:
# See: https://github.com/privatenumber/tsx/issues/354
node-version: [v18, v20]
env:
CI: true
LINT: ${{ matrix.node-version == 'v20' && true || false }}
steps:
# Setup.
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
# TODO(cleanup): https://github.com/actions/setup-node/issues/1027
# cache: yarn
# Build.
- run: corepack enable
- run: yarn install --immutable
- run: yarn dist
# Test.
- run: yarn test
- run: yarn lint
if: ${{ env.LINT == 'true' }}
#############################################################################
# DENO
deno:
runs-on: ubuntu-latest
env:
CI: true
NODE_VERSION: v18
steps:
# Setup.
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
# TODO(cleanup): https://github.com/actions/setup-node/issues/1027
# cache: yarn
# Build.
- run: corepack enable
- run: yarn install --immutable
- run: yarn dist
# Test.
- run: deno test --allow-read --config scripts/deno.json scripts/deno.test.ts
#############################################################################
# COVERAGE
coverage:
runs-on: ubuntu-latest
env:
CI: true
NODE_VERSION: v18
steps:
# Setup.
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
# TODO(cleanup): https://github.com/actions/setup-node/issues/1027
# cache: yarn
# Build.
- run: corepack enable
- run: yarn install --immutable
- run: yarn dist
# Coverage.
- run: yarn coverage
- run: yarn coverage:report
- uses: codecov/codecov-action@v4
with:
files: coverage/coverage.lcov
#############################################################################
# WINDOWS LOCAL BUILDS
windows:
runs-on: windows-latest
env:
CI: true
NODE_VERSION: 18.x
steps:
# Setup.
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
# TODO(cleanup): https://github.com/actions/setup-node/issues/1027
# cache: yarn
# Build.
- run: corepack enable
# See: https://github.com/yarnpkg/yarn/issues/4890
- run: yarn install --immutable --network-timeout 100000
- run: yarn dist