Skip to content

Update our CI pipelines to include Node 18 #1529

Update our CI pipelines to include Node 18

Update our CI pipelines to include Node 18 #1529

Workflow file for this run

name: CI
on:
push:
branches: ['main']
pull_request:
branches: ['main']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
strategy:
matrix:
include:
- NodeVersion: 14
OS: ubuntu-latest
- NodeVersion: 18
OS: ubuntu-latest
- NodeVersion: 16
OS: windows-latest
- NodeVersion: 18
OS: windows-latest
name: Node.js v${{ matrix.NodeVersion }} (${{ matrix.OS }})
runs-on: ${{ matrix.OS }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Git config user
run: |
git config --local user.name "Rushbot"
git config --local user.email "rushbot@users.noreply.github.com"
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.NodeVersion }}
# Workaround for Node 18 incompatibility with Webpack 4
- name: Enable Webpack4 workaround
run: echo "NODE_OPTIONS=--openssl-legacy-provider" >> $GITHUB_ENV
if: matrix.NodeVersion == 18
- name: Verify Change Logs
run: node common/scripts/install-run-rush.js change --verify
- name: Rush Install
run: node common/scripts/install-run-rush.js install
# - if: runner.os == 'Linux'
# name: Start xvfb
# run: /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Rush retest (install-run-rush)
run: node common/scripts/install-run-rush.js retest --verbose --production
env:
# Prevent time-based browserslist update warning
# See https://github.com/microsoft/rushstack/issues/2981
BROWSERSLIST_IGNORE_OLD_DATA: 1
- name: Ensure repo README is up-to-date
run: node repo-scripts/repo-toolbox/lib/start.js readme --verify
- name: Rush test (rush-lib)
run: node apps/rush/lib/start-dev.js test --verbose --production --timeline
env:
# Prevent time-based browserslist update warning
# See https://github.com/microsoft/rushstack/issues/2981
BROWSERSLIST_IGNORE_OLD_DATA: 1