Skip to content

Commit b927992

Browse files
authored
Merge pull request #66 from nodejs/srl295/issue65
add an integration test
2 parents 72ddf0c + efba470 commit b927992

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

.github/workflows/test.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Integration Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
container:
11+
# Official Node.js images.
12+
- node:12
13+
- node:14
14+
- node:16
15+
# RHEL Node.js builds are icu_small without installing the
16+
# optional nodejs-full-i18n rpm.
17+
- registry.access.redhat.com/ubi8/nodejs-12
18+
- registry.access.redhat.com/ubi8/nodejs-14
19+
# - registry.access.redhat.com/ubi8/nodejs-16
20+
- node:12-slim
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v2
25+
with:
26+
repository: nodejs/full-icu-test
27+
path: full-icu-test
28+
- name: Install full-icu
29+
run: docker run --rm -v $(pwd):/usr/src/app -w /usr/src/app ${{ matrix.container }} npm i --no-package-lock --unsafe-perm
30+
- 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

full-icu-test

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 0842b63e8d0c50c319631c1a2a4ace83cd006355

install-spawn.js

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ const spawnSync = require('child_process').spawnSync
88

99
const isglobal = process.env.npm_config_global === 'true'
1010
const npmrc = '.npmrc'
11+
if (!process.env.INIT_CWD) {
12+
throw Error('INIT_CWD was not set- does not seem like we were launched from npm')
13+
}
1114
const npmrcPath = path.resolve(process.env.INIT_CWD, npmrc)
1215

1316
// uses semver regex from https://semver.org/

0 commit comments

Comments
 (0)