Skip to content

Commit

Permalink
Merge pull request #3956 from alphagov/tests-on-node-20
Browse files Browse the repository at this point in the history
Add GitHub Actions export tests for Node.js v20
  • Loading branch information
colinrotherham authored Aug 1, 2023
2 parents d5456e0 + 9a9f69a commit 91d0a5d
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,17 +243,17 @@ jobs:

matrix:
node-version:
- 12.18 # Node.js 12.18 uses package exports with trailing slashes
- 12 # But Node.js 12.20+ uses package exports with subpath patterns
- 18
- 12 # Node.js 12.20+ uses package exports with subpath patterns
- 18 # Node.js 17+ cannot use package exports with trailing slashes
- 20

conditions:
- require
- import

exclude:
- conditions: import
node-version: 12.18
include:
- conditions: require
node-version: 12.18 # Node.js 12.18 uses package exports with trailing slashes

env:
# Node.js conditions override from "require" to "import" etc
Expand All @@ -264,9 +264,6 @@ jobs:
- name: Checkout
uses: actions/[email protected]

- name: Restore dependencies
uses: ./.github/workflows/actions/install-node

- name: Restore build
uses: ./.github/workflows/actions/build

Expand All @@ -276,10 +273,19 @@ jobs:
node-version: ${{ matrix.node-version }}

- run: node --eval "console.log(require.resolve('govuk-frontend'))"${{ env.FLAGS }}
working-directory: packages/govuk-frontend

- run: node --eval "console.log(require.resolve('govuk-frontend/package.json'))"${{ env.FLAGS }}
working-directory: packages/govuk-frontend

- run: node --eval "console.log(require.resolve('govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js'))"${{ env.FLAGS }}
working-directory: packages/govuk-frontend

- run: node --eval "console.log(require.resolve('govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs'))"${{ env.FLAGS }}
working-directory: packages/govuk-frontend

- run: node --eval "console.log(require.resolve('govuk-frontend/dist/govuk/i18n.mjs'))"${{ env.FLAGS }}
working-directory: packages/govuk-frontend

regression:
name: Percy
Expand Down

0 comments on commit 91d0a5d

Please sign in to comment.