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
dependabot[bot] c319d6575d
Bump actions/checkout from 2 to 3.1.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3.1.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-22 09:48:50 +00:00

57 lines
1.8 KiB
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: [12.x, 14.x, 16.x]
steps:
- uses: actions/checkout@v3
- 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
- uses: sonarsource/sonarcloud-github-action@master
if: matrix.node-version == '16.x'
with:
args: >
-Dsonar.organization=dzeio
-Dsonar.projectKey=dzeiocom_libs
-Dsonar.javascript.lcov.reportPaths=packages/**/coverage/lcov.info
-Dsonar.testExecutionReportPaths=packages/easy-sitemap/test-report.xml,packages/object-util/test-report.xml,packages/url-manager/test-report.xml
-Dsonar.sources=packages
-Dsonar.exclusions=packages/**/__tests__,packages/**/dist,node_modules,packages/**/coverage
-Dsonar.tests=packages/easy-sitemap/__tests__,packages/object-util/__tests__,packages/url-manager/__tests__
-Dsonar.test.inclusions=packages/**/*.test.ts
-Dsonar.sourceEncoding=UTF-8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}