From 38676da55aee3da609ccfb15e40183cbbcf872d3 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Wed, 20 Mar 2024 09:28:53 +0100 Subject: [PATCH] use shared GHA workflow for JS tests --- .github/workflows/js_tests.yml | 44 +++++++++++----------------------- 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/.github/workflows/js_tests.yml b/.github/workflows/js_tests.yml index a4b4702d8..62075f913 100644 --- a/.github/workflows/js_tests.yml +++ b/.github/workflows/js_tests.yml @@ -1,35 +1,19 @@ name: JavaScript Testing + on: pull_request: - paths: - - 'webpack/**' - - 'package.json' - - '.github/workflows/js_tests.yml' + push: + branches: + - 'master' + - '*-stable' + +concurrency: + group: ${{ github.ref_name }}-${{ github.workflow }} + cancel-in-progress: true jobs: - test_js: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - node-version: [12, 14] - steps: - - uses: actions/checkout@v2 - - uses: actions/checkout@v2 - with: - repository: theforeman/foreman - ref: develop - path: foreman - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: Npm install - run: npm install - - name: Npm install for core - run: npm install - working-directory: ./foreman - - name: Run plugin linter - run: npm run lint - - name: Run plugin tests - run: npm run test + test: + name: JavaScript + uses: theforeman/actions/.github/workflows/foreman_plugin_js.yml@v0 + with: + plugin: foreman_ansible