From ce5f1c461f73de0e06f32cdd697e6a577c855ebe Mon Sep 17 00:00:00 2001 From: Pavel Smirnov Date: Tue, 14 Nov 2023 16:17:09 -0500 Subject: [PATCH] Support development under Node.js 20 + update CI/CD to build both 18 and 20, + fix yarn cache location in AppVeyor, + remove the old notification setting. --- .appveyor.yml | 8 ++------ .github/workflows/ci.yml | 5 ++++- Dockerfile | 7 ++++--- package.json | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 31dd62f0..8f2efe54 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -2,8 +2,9 @@ version: "{build}" environment: matrix: - nodejs_version: "18" + - nodejs_version: "20" cache: - - "%LOCALAPPDATA%\\Yarn" + - ".yarn\\cache" - node_modules init: - git config --global core.autocrlf true @@ -15,8 +16,3 @@ test_script: - yarn ci build: off -notifications: - - provider: Slack - on_build_success: false - incoming_webhook: - secure: osWQbJf4imIh5jMhkZW0RfHDY+fm5Uksv9CeOMJFysrAfMBuOWnJGfHqcI3xAiKsbY8yZkd7VefQBu+4nu0iimyvsrQouxIoCcp4rkpz+EE= diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 654953c7..30b60897 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,9 @@ on: [push, pull_request] jobs: build: + strategy: + matrix: + node: [18, 20] runs-on: ubuntu-latest steps: - name: Checkout code @@ -12,7 +15,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 18 + node-version: ${{ matrix.node }} cache: 'yarn' - name: Install dependencies diff --git a/Dockerfile b/Dockerfile index ad5e1a34..9766e337 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,10 @@ -FROM node:18 AS build +FROM node:20 AS build COPY . /miew RUN cd /miew \ - && yarn ci + && yarn \ + && yarn run ci -FROM nginx:1.21-alpine +FROM nginx:1.25-alpine LABEL maintainer="miew@epam.com" COPY --from=build /miew/packages/lib/build /usr/share/nginx/html COPY --from=build /miew/packages/app/build /usr/share/nginx/html/app diff --git a/package.json b/package.json index 77295812..76dd3344 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ "packages/*" ], "engines": { - "npm": ">=9.0.0 <10.0.0", - "node": ">=18.0.0 <19.0.0" + "npm": ">=9.0.0 <11.0.0", + "node": ">=18.0.0 <21.0.0" }, "scripts": { "merge-cover": "lcov-result-merger 'coverage/lcov_*.info' > coverage/general.info",