From 32807abedd034a1c017179e1e04b029eb07241bc Mon Sep 17 00:00:00 2001 From: Florian BOUILLON Date: Wed, 12 Jul 2023 16:16:28 +0200 Subject: [PATCH] feat: Change workflows Signed-off-by: Florian BOUILLON --- .github/workflows/node.js.yml | 56 ------------------------- .github/workflows/test-config.yml | 42 +++++++++++++++++++ .github/workflows/test-dom-manager.yml | 42 +++++++++++++++++++ .github/workflows/test-easy-sitemap.yml | 42 +++++++++++++++++++ .github/workflows/test-listener.yml | 42 +++++++++++++++++++ .github/workflows/test-logger.yml | 42 +++++++++++++++++++ .github/workflows/test-object-util.yml | 42 +++++++++++++++++++ .github/workflows/test-queue.yml | 42 +++++++++++++++++++ .github/workflows/test-url-manager.yml | 42 +++++++++++++++++++ 9 files changed, 336 insertions(+), 56 deletions(-) delete mode 100644 .github/workflows/node.js.yml create mode 100644 .github/workflows/test-config.yml create mode 100644 .github/workflows/test-dom-manager.yml create mode 100644 .github/workflows/test-easy-sitemap.yml create mode 100644 .github/workflows/test-listener.yml create mode 100644 .github/workflows/test-logger.yml create mode 100644 .github/workflows/test-object-util.yml create mode 100644 .github/workflows/test-queue.yml create mode 100644 .github/workflows/test-url-manager.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml deleted file mode 100644 index 56e753e..0000000 --- a/.github/workflows/node.js.yml +++ /dev/null @@ -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 }} diff --git a/.github/workflows/test-config.yml b/.github/workflows/test-config.yml new file mode 100644 index 0000000..930b3e7 --- /dev/null +++ b/.github/workflows/test-config.yml @@ -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 diff --git a/.github/workflows/test-dom-manager.yml b/.github/workflows/test-dom-manager.yml new file mode 100644 index 0000000..8ebd87c --- /dev/null +++ b/.github/workflows/test-dom-manager.yml @@ -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 diff --git a/.github/workflows/test-easy-sitemap.yml b/.github/workflows/test-easy-sitemap.yml new file mode 100644 index 0000000..8f94a26 --- /dev/null +++ b/.github/workflows/test-easy-sitemap.yml @@ -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 diff --git a/.github/workflows/test-listener.yml b/.github/workflows/test-listener.yml new file mode 100644 index 0000000..95bf4b4 --- /dev/null +++ b/.github/workflows/test-listener.yml @@ -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 diff --git a/.github/workflows/test-logger.yml b/.github/workflows/test-logger.yml new file mode 100644 index 0000000..9e82806 --- /dev/null +++ b/.github/workflows/test-logger.yml @@ -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 diff --git a/.github/workflows/test-object-util.yml b/.github/workflows/test-object-util.yml new file mode 100644 index 0000000..0372a07 --- /dev/null +++ b/.github/workflows/test-object-util.yml @@ -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 diff --git a/.github/workflows/test-queue.yml b/.github/workflows/test-queue.yml new file mode 100644 index 0000000..5b50ad4 --- /dev/null +++ b/.github/workflows/test-queue.yml @@ -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 diff --git a/.github/workflows/test-url-manager.yml b/.github/workflows/test-url-manager.yml new file mode 100644 index 0000000..b540296 --- /dev/null +++ b/.github/workflows/test-url-manager.yml @@ -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