From ed175e245b23e9e7e9ddda62014760947f8a4638 Mon Sep 17 00:00:00 2001 From: chris48s Date: Sat, 15 Jul 2023 14:06:37 +0100 Subject: [PATCH] deploy on node 18, run tests on node 20 --- .github/workflows/danger.yml | 2 +- .github/workflows/deploy-docs.yml | 2 +- .github/workflows/test-e2e.yml | 2 +- .../{test-integration-18.yml => test-integration-20.yml} | 2 +- .github/workflows/test-integration.yml | 2 +- .github/workflows/test-lint.yml | 2 +- .github/workflows/{test-main-18.yml => test-main-20.yml} | 2 +- .../workflows/{test-services-18.yml => test-services-20.yml} | 2 +- .github/workflows/test-services.yml | 2 +- .github/workflows/update-github-api.yml | 2 +- Dockerfile | 4 ++-- README.md | 4 ++-- doc/TUTORIAL.md | 2 +- doc/self-hosting.md | 4 ++-- package-lock.json | 2 +- package.json | 4 ++-- 16 files changed, 20 insertions(+), 20 deletions(-) rename .github/workflows/{test-integration-18.yml => test-integration-20.yml} (97%) rename .github/workflows/{test-main-18.yml => test-main-20.yml} (94%) rename .github/workflows/{test-services-18.yml => test-services-20.yml} (98%) diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index f2dbb718415cd..6400bfdd07cac 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -19,7 +19,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 16 + node-version: 18 - name: Danger run: npm run danger ci diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index e966903c5fc3d..7077b5c18139d 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -19,7 +19,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 16 + node-version: 18 - name: Build run: npm run build-docs diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index dcc6b9506fc4b..746333abd3d4d 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -26,7 +26,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 16 + node-version: 18 cypress: true - name: Run tests diff --git a/.github/workflows/test-integration-18.yml b/.github/workflows/test-integration-20.yml similarity index 97% rename from .github/workflows/test-integration-18.yml rename to .github/workflows/test-integration-20.yml index c1e7a5a774bd2..c642a9de59913 100644 --- a/.github/workflows/test-integration-18.yml +++ b/.github/workflows/test-integration-20.yml @@ -35,7 +35,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 18 + node-version: 20 env: NPM_CONFIG_ENGINE_STRICT: 'false' diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index b86b9a43462fa..5c533ba225030 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -35,7 +35,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 16 + node-version: 18 - name: Integration Tests (with PAT) if: ${{ env.PAT_EXISTS == 'true' }} diff --git a/.github/workflows/test-lint.yml b/.github/workflows/test-lint.yml index ef5e177d38a8d..a5a5f6b1f379e 100644 --- a/.github/workflows/test-lint.yml +++ b/.github/workflows/test-lint.yml @@ -17,7 +17,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 16 + node-version: 18 - name: ESLint if: always() diff --git a/.github/workflows/test-main-18.yml b/.github/workflows/test-main-20.yml similarity index 94% rename from .github/workflows/test-main-18.yml rename to .github/workflows/test-main-20.yml index 247cbb68ebc42..6febdcff9e4d8 100644 --- a/.github/workflows/test-main-18.yml +++ b/.github/workflows/test-main-20.yml @@ -17,7 +17,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 18 + node-version: 20 env: NPM_CONFIG_ENGINE_STRICT: 'false' diff --git a/.github/workflows/test-services-18.yml b/.github/workflows/test-services-20.yml similarity index 98% rename from .github/workflows/test-services-18.yml rename to .github/workflows/test-services-20.yml index a690a2860acf2..28fdea12098c9 100644 --- a/.github/workflows/test-services-18.yml +++ b/.github/workflows/test-services-20.yml @@ -17,7 +17,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 18 + node-version: 20 env: NPM_CONFIG_ENGINE_STRICT: 'false' diff --git a/.github/workflows/test-services.yml b/.github/workflows/test-services.yml index 9d269b41c1e37..0e4a614d48d1b 100644 --- a/.github/workflows/test-services.yml +++ b/.github/workflows/test-services.yml @@ -17,7 +17,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 16 + node-version: 18 - name: Service tests (triggered from local branch) if: github.event.pull_request.head.repo.full_name == github.repository diff --git a/.github/workflows/update-github-api.yml b/.github/workflows/update-github-api.yml index 191aaa98b4ba3..027613cb44d61 100644 --- a/.github/workflows/update-github-api.yml +++ b/.github/workflows/update-github-api.yml @@ -19,7 +19,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 16 + node-version: 18 - name: Check for new GitHub API version run: node scripts/update-github-api.js diff --git a/Dockerfile b/Dockerfile index 832bf81132072..8de3b50539964 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:16-alpine AS Builder +FROM node:18-alpine AS Builder RUN mkdir -p /usr/src/app RUN mkdir /usr/src/app/private @@ -19,7 +19,7 @@ RUN npm prune --production RUN npm cache clean --force # Use multi-stage build to reduce size -FROM node:16-alpine +FROM node:18-alpine ARG version=dev ENV DOCKER_SHIELDS_VERSION=$version diff --git a/README.md b/README.md index b8c4f8f9706ec..1c3bda987fc1b 100644 --- a/README.md +++ b/README.md @@ -98,8 +98,8 @@ You can read a [tutorial on how to add a badge][tutorial]. ## Development -1. Install Node 16 or later. You can use the [package manager][] of your choice. - Tests need to pass in Node 16 and 17. +1. Install Node 18 or later. You can use the [package manager][] of your choice. + Tests need to pass in Node 18 and 20. 2. Clone this repository. 3. Run `npm ci` to install the dependencies. 4. Run `npm start` to start the badge server and the frontend dev server. diff --git a/doc/TUTORIAL.md b/doc/TUTORIAL.md index f649f197ce5f9..f01e975b23592 100644 --- a/doc/TUTORIAL.md +++ b/doc/TUTORIAL.md @@ -25,7 +25,7 @@ and learn about the [GitHub workflow](http://try.github.io/). #### Node, NPM -Node >=16 and NPM >=8 is required. If you don't already have them, +Node >=18 and NPM >=8 is required. If you don't already have them, install node and npm: https://nodejs.org/en/download/ ### Setup a dev install diff --git a/doc/self-hosting.md b/doc/self-hosting.md index 63d5acf1d31df..5d83f42e94d5a 100644 --- a/doc/self-hosting.md +++ b/doc/self-hosting.md @@ -4,13 +4,13 @@ This document describes how to host your own shields server either from source o ## Installing from Source -You will need Node 16 or later, which you can install using a +You will need Node 18 or later, which you can install using a [package manager][]. On Ubuntu / Debian: ```sh -curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -; sudo apt-get install -y nodejs +curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -; sudo apt-get install -y nodejs ``` ```sh diff --git a/package-lock.json b/package-lock.json index 01f66f47f5016..a7947b0c3f58f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -125,7 +125,7 @@ "url": "^0.11.1" }, "engines": { - "node": "^16.13.0", + "node": "^18.16.1", "npm": ">=8.0.0" } }, diff --git a/package.json b/package.json index 9ca87ebd0a0dc..5552b0fe6c285 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "pretest": "cross-env BASE_URL=http://localhost:8080 run-s --silent defs", "test": "run-s --silent --continue-on-error lint test:package test:core test:entrypoint check-types:package prettier:check", "check-types:package": "tsd badge-maker", - "depcheck": "check-node-version --node \">= 16.0\"", + "depcheck": "check-node-version --node \">= 18.0\"", "prebuild": "run-s --silent depcheck", "defs": "node scripts/export-openapi-cli.js", "build": "rimraf public && run-s defs docusaurus:build", @@ -212,7 +212,7 @@ "url": "^0.11.1" }, "engines": { - "node": "^16.13.0", + "node": "^18.16.1", "npm": ">=8.0.0" }, "type": "module",