Skip to content

Commit d499e98

Browse files
committed
doc/test: document the FULL_ICU_PREFER_NPM
- also, test with FULL_ICU_PREFER_NPM=1
1 parent e4545b4 commit d499e98

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

.github/workflows/test.yml renamed to .github/workflows/test-gh.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Integration Test
1+
name: Integration Test GitHub
22

33
on: [push, pull_request]
44

@@ -28,4 +28,4 @@ jobs:
2828
- name: Install full-icu
2929
run: docker run --rm -v $(pwd):/usr/src/app -w /usr/src/app ${{ matrix.container }} npm i --no-package-lock --unsafe-perm
3030
- name: Test full-icu
31-
run: docker run --rm -v $(pwd):/usr/src/app -w /usr/src/app ${{ matrix.container }} --icu-data-dir=. ./full-icu-test/test.js
31+
run: docker run --rm -e NODE_ICU_DATA=. -v $(pwd):/usr/src/app -w /usr/src/app ${{ matrix.container }} node ./full-icu-test/test.js

.github/workflows/test-npm.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Integration Test npm
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
container:
11+
- node:12
12+
- node:12-slim
13+
# Will fail on versions that aren't in icu4c-data
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v2
18+
with:
19+
repository: nodejs/full-icu-test
20+
path: full-icu-test
21+
- name: Install full-icu
22+
run: docker run --rm -v $(pwd):/usr/src/app -w /usr/src/app ${{ matrix.container }} env FULL_ICU_PREFER_NPM=1 npm i --no-package-lock --unsafe-perm
23+
- name: Test full-icu
24+
run: docker run --rm -e NODE_ICU_DATA=. -v $(pwd):/usr/src/app -w /usr/src/app ${{ matrix.container }} node ./full-icu-test/test.js

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# full-icu-npm
22

3-
Install full ICU data
3+
Install full ICU data from GitHub or npm
44

55
### To use
66

77
`npm install full-icu`
88

9+
Note: Set env var `FULL_ICU_PREFER_NPM=true` to prefer using the `icu4c-data` npm module,
10+
otherwise the default is now to load from ICU4C’s GitHub release.
11+
912
### To install globally
1013

1114
`npm install -g full-icu`

0 commit comments

Comments
 (0)