1
0
mirror of https://github.com/dzeiocom/libs.git synced 2025-04-22 10:52:11 +00:00
libs/.github/workflows/node.js.yml

40 lines
941 B
YAML

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.4.1
with:
node-version: ${{ matrix.node-version }}
- name: Upgrade NPM
run: npm -g install npm
- name: Install packages
run: npm i && npm i --workspaces
- name: Build packages
run: npm run build --workspaces --if-present
- name: Test packages
run: npm run test --workspaces --if-present