Files
bower/.github/workflows/nodejs.yml
Sampo Silvennoinen 4e0c3c1181 CI: add Node.js 18, 20 & 22 (#2630)
* CI workflow: add Node.js 18, 20 & 22

* CI workflow: pin old Node.js versions to older MacOS

MacOS-latest can run Node versions 6 - 14 anymore. Pin them to MacOS-13 to keep the actions running

* CI: update used GH action versions

* CI: allow failure on Windows

All Windows pipelines currently fail for some integration tests. It seems to be a question of running actual git commands inside a Windows based Github action runner. Reverting it to older Windows runner wont help.
2024-10-13 12:45:04 +02:00

89 lines
2.6 KiB
YAML

name: build
on:
push:
branches:
- master
pull_request:
branches:
- '**'
jobs:
test:
name: Node v${{ matrix.node-version }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# https://github.com/actions/setup-node/issues/27
node-version: [6.x, 8.x, 10.x, 12.x, 14.x, 16.x, 18.x, 20.x, 22.x]
os: [ubuntu-latest, macOS-latest, windows-latest]
include:
# Pin deprecated Node.js versions on Mac to specific MacOS,
# as later OS architecture wont support them anymore.
- node-version: 6.x
os: macOS-13
- node-version: 8.x
os: macOS-13
- node-version: 10.x
os: macOS-13
- node-version: 12.x
os: macOS-13
- node-version: 14.x
os: macOS-13
exclude:
# Exclude older Node.js versions from macOS-latest
- node-version: 6.x
os: macOS-latest
- node-version: 8.x
os: macOS-latest
- node-version: 10.x
os: macOS-latest
- node-version: 12.x
os: macOS-latest
- node-version: 14.x
os: macOS-latest
runs-on: ${{ matrix.os }}
steps:
- name: Set git config
shell: bash
run: |
git config --global core.autocrlf false
git config --global core.symlinks true
if: runner.os == 'Windows'
- uses: actions/checkout@v4
- name: install
run: yarn && (cd packages/bower-json && yarn link) && yarn link bower-json
- name: lint
run: npm run lint
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: bower tests
run: npm test
env:
CI: true
continue-on-error: ${{ matrix.os == 'windows-latest' }} # Allow failure on Windows
- name: bower-logger tests
run: (cd packages/bower-logger && npm install && npm test)
env:
CI: true
- name: bower-config tests
run: (cd packages/bower-config && npm install && npm test)
env:
CI: true
- name: bower-endpoint-parser tests
run: (cd packages/bower-endpoint-parser && npm install && npm test)
env:
CI: true
- name: bower-json tests
run: (cd packages/bower-json && npm install && npm test)
env:
CI: true
- name: bower-registry-client tests
run: (cd packages/bower-registry-client && npm install && npm test)
env:
CI: true