Skip to content

Commit

Permalink
chore!: require Node 18; use pnpm (speced#4416)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Require Node v18.14+
  • Loading branch information
sidvishnoi authored Apr 5, 2023
1 parent e75e42f commit c96023a
Show file tree
Hide file tree
Showing 11 changed files with 3,827 additions and 11,090 deletions.
17 changes: 9 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
time: "10:00"
open-pull-requests-limit: 10
labels: [dependencies]
versioning-strategy: increase
# # pnpm support coming soon: https://github.com/dependabot/dependabot-core/issues/1736#issuecomment-1489987159
# - package-ecosystem: npm
# directory: "/"
# schedule:
# interval: weekly
# time: "10:00"
# open-pull-requests-limit: 10
# labels: [dependencies]
# versioning-strategy: increase

- package-ecosystem: github-actions
directory: "/"
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,25 @@ jobs:
curl -sL https://api.github.com/repos/w3c/respec/pulls/${{ github.event.pull_request.number }}/files -o /tmp/pr_files.json
cat /tmp/pr_files.json | jq -r '.[].filename' | grep -qE "^builds/" || exit 0
echo "::error::Uh oh! builds/ was changed."; exit 1
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with: { node-version: 16, cache: npm }
- run: npm ci
- run: npm run lint
with: { node-version: 18, cache: pnpm }
- run: pnpm i --frozen-lockfile
- run: pnpm lint

test-headless:
name: Headless Tests
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with: { node-version: 16, cache: npm }
- run: npm ci
- run: npm run test:build
- run: npm run build:w3c
- run: npm run test:headless
with: { node-version: 18, cache: pnpm }
- run: pnpm i --frozen-lockfile
- run: pnpm test:build
- run: pnpm build:w3c
- run: pnpm test:headless

test-karma:
name: Karma Unit Tests (${{ matrix.browser }})
Expand All @@ -57,16 +59,15 @@ jobs:
needs: lint
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with: { node-version: 16, cache: npm }
- name: install & build
run: |
npm ci
npm run build:w3c & npm run build:geonovum
- run: npm run test:unit
with: { node-version: 18, cache: pnpm }
- run: pnpm i --frozen-lockfile
- run: pnpm build:w3c & pnpm build:geonovum
- run: pnpm test:unit
env:
BROWSERS: ${{ matrix.browser }}
- run: npm run test:integration
- run: pnpm test:integration
env:
BROWSERS: ${{ matrix.browser }}

Expand All @@ -76,12 +77,11 @@ jobs:
needs: lint
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with: { node-version: 16, cache: npm }
- name: install & build
run: |
npm ci
npm run build:w3c
with: { node-version: 18, cache: pnpm }
- run: pnpm i --frozen-lockfile
- run: pnpm build:w3c
- name: run validator
run: |
vnu=$(node -p "require('vnu-jar')")
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with: { node-version: 16, cache: npm }
- name: install & build
run: |
npm ci
npm run build:w3c
- run: npm run test:headless
with: { node-version: 18, cache: pnpm }
- run: pnpm i --frozen-lockfile
- run: pnpm build:w3c
- run: pnpm test:headless
- name: Calculate size and update on server
run: |
timestamp=$(git show --no-patch --pretty='%cd' --date='format:%s')
Expand All @@ -53,12 +52,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with: { node-version: 16, cache: npm }
- name: install & build
run: |
npm ci
npm run build:w3c & npm run build:geonovum
- run: npm test
with: { node-version: 18, cache: pnpm }
- run: pnpm i --frozen-lockfile
- run: pnpm build:w3c & pnpm build:geonovum
- run: pnpm test
env:
BROWSERS: ChromeHeadless
12 changes: 7 additions & 5 deletions .github/workflows/regressions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with: { node-version: 16, cache: npm }
- run: npm ci
- run: npm run build:w3c
with: { node-version: 18, cache: pnpm }
- run: pnpm i --frozen-lockfile
- run: pnpm build:w3c
- uses: actions/upload-artifact@v3
with:
name: builds
Expand All @@ -41,9 +42,10 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with: { node-version: 16, cache: npm }
- run: npm ci --production --ignore-scripts
with: { node-version: 18, cache: pnpm }
- run: pnpm i --frozen-lockfile
- uses: actions/download-artifact@v3
with:
name: builds
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ js/deps/builds
!js/profile-w3c.js
.vscode/*
!.vscode/tasks.json
pnpm-lock.yaml
package-lock.json
yarn.lock
*.log
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
Loading

0 comments on commit c96023a

Please sign in to comment.