From 0872b78c40d39aaa987c74232c30bc5a3bb2bf8b Mon Sep 17 00:00:00 2001 From: Jakob Linskeseder Date: Fri, 20 May 2022 22:18:59 +0200 Subject: [PATCH] Add CI check for unmet dependencies Fixes #1592 --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c692488..2d3455da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,6 +25,31 @@ jobs: - name: Lint run: npm run lint + dependencies: + name: Test (dependencies) + runs-on: 'ubuntu-latest' + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + # Node 14 ships with npm v6, which doesn't install peer-dependencies by default. + # Starting with npm v7 (which is shipped with Node >= 16), peer-dependencies are + # automatically installed. So this test (check for unmet peer-dependencies) only + # works with Node <= 14. + node-version: '14' + + # Simulate an installation by a dependent package + - name: Install dependencies + run: | + rm package-lock.json + npm install --production + + - name: Check dependency tree + run: npm ls + test: name: Test (Node) runs-on: ${{ matrix.operating-system }}