Skip to content

Commit e0de1d9

Browse files
committed
Add CI check for unmet dependencies
Fixes #1592
1 parent 9bff03f commit e0de1d9

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,31 @@ jobs:
2525
- name: Lint
2626
run: npm run lint
2727

28+
dependencies:
29+
name: Test (dependencies)
30+
runs-on: 'ubuntu-latest'
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v2
34+
35+
- name: Setup Node.js
36+
uses: actions/setup-node@v2
37+
with:
38+
# Node 14 ships with npm v6, which doesn't install peer-dependencies by default.
39+
# Starting with npm v7 (which is shipped with Node >= 16), peer-dependencies are
40+
# automatically installed. So this test (check for unmet peer-dependencies) only
41+
# works with Node <= 14.
42+
node-version: '14'
43+
44+
# Simulate an installation by a dependent package
45+
- name: Install dependencies
46+
run: |
47+
rm package-lock.json
48+
npm install --production
49+
50+
- name: Check dependency tree
51+
run: npm ls
52+
2853
test:
2954
name: Test (Node)
3055
runs-on: ${{ matrix.operating-system }}

0 commit comments

Comments
 (0)