From 1d6e10c38cae67126d70adac84e7ef2495ef1c49 Mon Sep 17 00:00:00 2001 From: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com> Date: Mon, 19 Dec 2022 20:29:50 +0530 Subject: [PATCH] fix(ci): add node 18 build, test variants (#48117) --- .github/workflows/crowdin-download.curriculum.yml | 2 +- .github/workflows/e2e-mobile.yml | 7 +++++-- .github/workflows/e2e-third-party.yml | 7 +++++-- .github/workflows/e2e-web.yml | 9 ++++++--- .github/workflows/i18n-validate-builds.yml | 8 ++++---- .github/workflows/i18n-validate-prs.yml | 7 ++++--- .github/workflows/node.js-find-unused.yml | 2 +- .github/workflows/node.js-tests-upcoming.yml | 7 +++---- .github/workflows/node.js-tests.yml | 11 +++++------ 9 files changed, 34 insertions(+), 26 deletions(-) diff --git a/.github/workflows/crowdin-download.curriculum.yml b/.github/workflows/crowdin-download.curriculum.yml index 8f8fb3088e1..4ea86058734 100644 --- a/.github/workflows/crowdin-download.curriculum.yml +++ b/.github/workflows/crowdin-download.curriculum.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - node-version: [16.x] + node-version: [18.x] fail-fast: true steps: diff --git a/.github/workflows/e2e-mobile.yml b/.github/workflows/e2e-mobile.yml index 88f3b9d1399..a1cd7ebd63c 100644 --- a/.github/workflows/e2e-mobile.yml +++ b/.github/workflows/e2e-mobile.yml @@ -14,6 +14,9 @@ jobs: mobile-test: name: Test curriculum for mobile app runs-on: ubuntu-20.04 + strategy: + matrix: + node-version: [18.x] steps: - name: Checkout Source Files @@ -25,10 +28,10 @@ jobs: repository: freeCodeCamp/mobile path: mobile - - name: Use Node.js 16.x + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3 with: - node-version: 16.x + node-version: ${{ matrix.node-version }} - name: Setup Flutter 3.3.x uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d # tag=v2 diff --git a/.github/workflows/e2e-third-party.yml b/.github/workflows/e2e-third-party.yml index 4c8140a082e..b6b35b5d86b 100644 --- a/.github/workflows/e2e-third-party.yml +++ b/.github/workflows/e2e-third-party.yml @@ -13,6 +13,9 @@ jobs: do-everything: name: Build & Test runs-on: ubuntu-20.04 + strategy: + matrix: + node-version: [18.x] services: mongodb: image: mongo:4.4 @@ -34,10 +37,10 @@ jobs: repository: freeCodeCamp/client-config path: client-config - - name: Use Node.js 16.x + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3 with: - node-version: 16.x + node-version: ${{ matrix.node-version }} - name: Set freeCodeCamp Environment Variables run: | diff --git a/.github/workflows/e2e-web.yml b/.github/workflows/e2e-web.yml index 2e9280bb58a..c20ece5c601 100644 --- a/.github/workflows/e2e-web.yml +++ b/.github/workflows/e2e-web.yml @@ -16,6 +16,9 @@ jobs: build-client: name: Build runs-on: ubuntu-20.04 + strategy: + matrix: + node-version: [18.x] steps: - name: Checkout Source Files @@ -27,10 +30,10 @@ jobs: repository: freeCodeCamp/client-config path: client-config - - name: Use Node.js 16.x + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3 with: - node-version: 16.x + node-version: ${{ matrix.node-version }} - name: Set freeCodeCamp Environment Variables run: cp sample.env .env @@ -67,7 +70,7 @@ jobs: fail-fast: false matrix: browsers: [chrome, firefox, electron] - node-version: [16.x] + node-version: [18.x] include: - browsers: electron spec: cypress/e2e/default/learn/challenges/projects.js diff --git a/.github/workflows/i18n-validate-builds.yml b/.github/workflows/i18n-validate-builds.yml index c28d23b087a..a5f56716080 100644 --- a/.github/workflows/i18n-validate-builds.yml +++ b/.github/workflows/i18n-validate-builds.yml @@ -7,20 +7,20 @@ on: jobs: ci: name: Validate i18n Builds - runs-on: ubuntu-latest - + runs-on: ubuntu-20.04 strategy: matrix: - node-version: [16.x] + node-version: [18.x] steps: - name: Checkout Source Files uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 - - name: Use Node.js v${{ matrix.node-version }} + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3 with: node-version: ${{ matrix.node-version }} + cache: 'npm' - name: Set freeCodeCamp Environment Variables run: cp sample.env .env diff --git a/.github/workflows/i18n-validate-prs.yml b/.github/workflows/i18n-validate-prs.yml index c6f946c840c..92afb6ee388 100644 --- a/.github/workflows/i18n-validate-prs.yml +++ b/.github/workflows/i18n-validate-prs.yml @@ -7,21 +7,22 @@ on: jobs: ci: name: Validate i18n Builds - runs-on: ubuntu-latest # run only on PRs that camperbot opens with title that matches the curriculum sync if: ${{ github.event.pull_request.user.login == 'camperbot' && contains(github.event.pull_request.title, 'chore(i18n,learn)') }} + runs-on: ubuntu-20.04 strategy: matrix: - node-version: [16.x] + node-version: [18.x] steps: - name: Checkout Source Files uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 - - name: Use Node.js v${{ matrix.node-version }} + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3 with: node-version: ${{ matrix.node-version }} + cache: 'npm' - name: Set freeCodeCamp Environment Variables run: cp sample.env .env diff --git a/.github/workflows/node.js-find-unused.yml b/.github/workflows/node.js-find-unused.yml index fed1ebfcc85..a0bde535061 100644 --- a/.github/workflows/node.js-find-unused.yml +++ b/.github/workflows/node.js-find-unused.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [16.x] + node-version: [18.x] steps: - name: Checkout Source Files diff --git a/.github/workflows/node.js-tests-upcoming.yml b/.github/workflows/node.js-tests-upcoming.yml index 5bcd15e04b5..1fd303ad918 100644 --- a/.github/workflows/node.js-tests-upcoming.yml +++ b/.github/workflows/node.js-tests-upcoming.yml @@ -19,11 +19,10 @@ jobs: lint: name: Lint runs-on: ubuntu-20.04 - strategy: - fail-fast: false matrix: - node-version: [16.x] + node-version: [18.x] + fail-fast: false steps: - name: Checkout Source Files @@ -58,7 +57,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [16.x] + node-version: [18.x] steps: - name: Checkout Source Files diff --git a/.github/workflows/node.js-tests.yml b/.github/workflows/node.js-tests.yml index 37d355c15cb..d32a1ace337 100644 --- a/.github/workflows/node.js-tests.yml +++ b/.github/workflows/node.js-tests.yml @@ -17,11 +17,10 @@ jobs: lint: name: Lint runs-on: ubuntu-20.04 - strategy: - fail-fast: false matrix: - node-version: [16.x] + node-version: [18.x] + fail-fast: false steps: - name: Checkout Source Files @@ -66,7 +65,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [16.x] + node-version: [18.x] steps: - name: Checkout Source Files @@ -100,7 +99,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [16.x] + node-version: [18.x] steps: - name: Checkout Source Files @@ -135,7 +134,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [16.x] + node-version: [18.x] locale: [chinese, espanol] steps: