1
0
mirror of https://github.com/dzeiocom/libs.git synced 2025-04-22 19:02:14 +00:00

feat: Change workflows

Signed-off-by: Florian BOUILLON <f.bouillon@aptatio.com>
This commit is contained in:
Florian Bouillon 2023-07-12 16:16:28 +02:00
parent ba4aade516
commit 32807abedd
9 changed files with 336 additions and 56 deletions

View File

@ -1,56 +0,0 @@
# 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, 20.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
- 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 }}

42
.github/workflows/test-config.yml vendored Normal file
View File

@ -0,0 +1,42 @@
# 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: Test Config
on:
push:
paths:
- './packages/config/**'
- '.github/workflows/test-config.yml'
branches: [ "master" ]
pull_request:
paths:
- './packages/config/**'
- '.github/workflows/test-config.yml'
branches: [ "master" ]
jobs:
config:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/config
strategy:
matrix:
node-version: [14.x, 16.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Config deps
run: npm ci
- name: Build Config
run: npm run build
# - name: Test DOM Manager
# run: npm run test

42
.github/workflows/test-dom-manager.yml vendored Normal file
View File

@ -0,0 +1,42 @@
# 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: Test DOM Manager
on:
push:
paths:
- './packages/dom-manager/**'
- '.github/workflows/dom-manager.yml'
branches: [ "master" ]
pull_request:
paths:
- './packages/dom-manager/**'
- '.github/workflows/dom-manager.yml'
branches: [ "master" ]
jobs:
dom-manager:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/dom-manager
strategy:
matrix:
node-version: [14.x, 16.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install DOM Manager deps
run: npm ci
- name: Build DOM Manager
run: npm run build
# - name: Test DOM Manager
# run: npm run test

42
.github/workflows/test-easy-sitemap.yml vendored Normal file
View File

@ -0,0 +1,42 @@
# 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: Test Easy Sitemap
on:
push:
paths:
- './packages/easy-sitemap/**'
- '.github/workflows/test-easy-sitemap.yml'
branches: [ "master" ]
pull_request:
paths:
- './packages/easy-sitemap/**'
- '.github/workflows/test-easy-sitemap.yml'
branches: [ "master" ]
jobs:
easy-sitemap:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/easy-sitemap
strategy:
matrix:
node-version: [14.x, 16.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Easy Sitemap deps
run: npm ci
- name: Build Easy Sitemap
run: npm run build
- name: Test Easy Sitemap
run: npm run test

42
.github/workflows/test-listener.yml vendored Normal file
View File

@ -0,0 +1,42 @@
# 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: Test Listener
on:
push:
paths:
- './packages/listener/**'
- '.github/workflows/test-listener.yml'
branches: [ "master" ]
pull_request:
paths:
- './packages/listener/**'
- '.github/workflows/test-listener.yml'
branches: [ "master" ]
jobs:
listener:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/listener
strategy:
matrix:
node-version: [14.x, 16.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Listener deps
run: npm ci
- name: Build Listener
run: npm run build
# - name: Test DOM Manager
# run: npm run test

42
.github/workflows/test-logger.yml vendored Normal file
View File

@ -0,0 +1,42 @@
# 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: Test Logger
on:
push:
paths:
- './packages/logger/**'
- '.github/workflows/test-logger.yml'
branches: [ "master" ]
pull_request:
paths:
- './packages/logger/**'
- '.github/workflows/test-logger.yml'
branches: [ "master" ]
jobs:
logger:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/logger
strategy:
matrix:
node-version: [14.x, 16.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Logger deps
run: npm ci
- name: Build Logger
run: npm run build
- name: Test Logger
run: npm run test

42
.github/workflows/test-object-util.yml vendored Normal file
View File

@ -0,0 +1,42 @@
# 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: Test Object Util
on:
push:
paths:
- './packages/object-util/**'
- '.github/workflows/test-object-util.yml'
branches: [ "master" ]
pull_request:
paths:
- './packages/object-util/**'
- '.github/workflows/test-object-util.yml'
branches: [ "master" ]
jobs:
dom-manager:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/object-util
strategy:
matrix:
node-version: [14.x, 16.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Object Util deps
run: npm ci
- name: Build Object Util
run: npm run build
- name: Test Object Util
run: npm run test

42
.github/workflows/test-queue.yml vendored Normal file
View File

@ -0,0 +1,42 @@
# 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: Test Queue
on:
push:
paths:
- './packages/queue/**'
- '.github/workflows/test-queue.yml'
branches: [ "master" ]
pull_request:
paths:
- './packages/queue/**'
- '.github/workflows/test-queue.yml'
branches: [ "master" ]
jobs:
dom-manager:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/queue
strategy:
matrix:
node-version: [14.x, 16.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Queue deps
run: npm ci
- name: Build Queue
run: npm run build
# - name: Test Queue
# run: npm run test

42
.github/workflows/test-url-manager.yml vendored Normal file
View File

@ -0,0 +1,42 @@
# 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: Test URL Manager
on:
push:
paths:
- './packages/url-manager/**'
- '.github/workflows/test-url-manager.yml'
branches: [ "master" ]
pull_request:
paths:
- './packages/url-manager/**'
- '.github/workflows/test-url-manager.yml'
branches: [ "master" ]
jobs:
dom-manager:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/url-manager
strategy:
matrix:
node-version: [14.x, 16.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install URL Manager deps
run: npm ci
- name: Build URL Manager
run: npm run build
- name: Test URL Manager
run: npm run test