Skip to content

Commit

Permalink
Use custom Node.js binary in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
cometkim committed Nov 1, 2024
1 parent 3d4af84 commit 38779ba
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
/src/_grapheme_table.js linguist-generated
/src/_incb_table.js linguist-generated
/test/_unicode_testdata.js linguist-generated

/prebuilt/* linguist-vendored
23 changes: 22 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,29 @@ jobs:
- name: Install Dependencies
run: yarn install --immutable

- uses: actions/cache@v4
id: cache-prebuilt-node
with:
key: node-v24.0.0-pre-linux-x64_icu76.1
path: prebuilt/node-v24.0.0-pre-linux-x64_icu76.1

- name: Download Prebuilt Node.js with ICU 76.1
if: steps.cache-prebuilt-node.cache-hit != 'true'
run: |
sudo apt-get update && sudo apt-get upgrade g++
ls -al /lib/x86_64-linux-gnu
export PREBUILT_BINARY="prebuilt/node-v24.0.0-pre-linux-x64_icu76.1"
mkdir -p "$(dirname $PREBUILT_BINARY)"
curl -fsSL -o "$PREBUILT_BINARY" \
"https://github-actions-assets.cometkim.dev/$PREBUILT_BINARY"
chmod +x "$PREBUILT_BINARY"
echo "PREBUILT_BINARY=$PREBUILT_BINARY" >> $GITHUB_ENV
- name: Execute Tests
run: yarn test:coverage
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]
Expand Down

0 comments on commit 38779ba

Please sign in to comment.