-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (62 loc) · 1.83 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
name: Integration
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build:
name: Checking build
runs-on: ubuntu-24.04
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
- name: Install Dependencies
run: yarn install --immutable
- name: Build
run: yarn build
test:
name: Running tests
runs-on: ubuntu-24.04
env:
PREBUILT_BINARY: prebuilt/node-v24.0.0-pre-linux-x64_icu76.1
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
- name: Install Dependencies
run: yarn install --immutable
- uses: actions/cache@v4
id: cache-prebuilt-node
with:
key: ${{ env.PREBUILT_BINARY }}
path: ${{ env.PREBUILT_BINARY }}
- name: Install prebuilt Node.js with custom ICU
if: steps.cache-prebuilt-node.cache-hit != 'true'
run: |
mkdir -p "$(dirname $PREBUILT_BINARY)"
curl -fsSL -o "$PREBUILT_BINARY" \
"https://github-actions-assets.cometkim.dev/$PREBUILT_BINARY"
chmod +x "$PREBUILT_BINARY"
- name: Execute Tests
run: |
$PREBUILT_BINARY \
--test --test-reporter spec --test-reporter-destination=stdout \
--experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: cometkim/unicode-segmenter
file: lcov.info