-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (54 loc) · 1.89 KB
/
e2e-test.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
name: e2e test
on:
push:
branches: [master, ci/**]
pull_request:
branches: [master, ci/**]
workflow_dispatch:
# Keep this to allow for triggering manually
jobs:
e2e-test:
strategy:
matrix:
# at the time jsonmerge was created (Feb 10, 2016):
# node versions: 0.10.x, 0.12.x, 4
# https://github.com/nodejs/node/blob/main/CHANGELOG.md
# os versions: windows-2016, ubuntu-14.04
# https://en.wikipedia.org/wiki/Ubuntu_version_history
node-version:
# trying to pick up the lowest versions within the supported options
# https://github.com/actions/node-versions/blob/main/versions-manifest.json
# - 6
- 8
- 10 # skip
# - 12 # skip
# - 14 # skip
os:
# trying to pick up the lowest versions within the supported options
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#choosing-github-hosted-runners
- windows-2019
- ubuntu-20.04
- macos-11
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: |
npm install --production
npm link
- name: Test Json
run: |
cd test/fixtures
jsonmerge json/*.json > tmp.json
node -e "assert.equal(fs.readFileSync('tmp.json','utf8'), fs.readFileSync('result.json','utf8'))"
- name: Test Jsonc
# current jsonc implementation requires node>=8
if: matrix.node-version >= 8
run: |
cd test/fixtures
jsonmerge --jsonc jsonc/*.json > tmp.jsonc
node -e "assert.equal(fs.readFileSync('tmp.jsonc','utf8'), fs.readFileSync('result.json','utf8'))"