Skip to content

Commit

Permalink
ci(semantic-release-whmcs): reviewed test workflow jobs, introduced p…
Browse files Browse the repository at this point in the history
…arallel job config to run 1 job at a time to avoid timeouts
  • Loading branch information
AsifNawaz-cnic committed Sep 23, 2024
1 parent 9f1cc4f commit 7c44850
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions .github/workflows/semantic-release-whmcs-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,33 @@ on:

jobs:
lint:
name: 🧪 Linting & Testing
name: 🧪 Linting
runs-on: ${{ vars.RTLDEV_MW_CI_OS }}
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup NodeJS ${{ vars.RTLDEV_MW_CI_NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ vars.RTLDEV_MW_CI_NODE_VERSION }}
cache: npm
- name: Install dependencies
run: npm ci
- name: Linting
run: npm run lint

test:
name: 🧪 Testing
runs-on: ${{ vars.RTLDEV_MW_CI_OS }}
needs: lint
permissions:
contents: read
strategy:
max-parallel: 1 # Run 1 job at a time to avoid timeouts
matrix:
node-version: ${{ fromJson(vars.RTLDEV_MW_CI_NODE_MATRIX) }}

steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -22,8 +41,6 @@ jobs:
cache: npm
- name: Install dependencies
run: npm ci
- name: Linting
run: npm run lint
- name: Tests
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
Expand All @@ -41,7 +58,7 @@ jobs:
perform_codeql_analysis:
name: 🧪 CodeQL Analysis
runs-on: ${{ vars.RTLDEV_MW_CI_OS }}
needs: lint
needs: test
permissions:
contents: read
security-events: write
Expand All @@ -66,6 +83,7 @@ jobs:
needs:
- perform_codeql_analysis
- lint
- test
if: ${{ github.actor == 'dependabot[bot]' && (success() || needs.lint.result == 'success' || needs.perform_codeql_analysis.result == 'success') }}
uses: ./.github/workflows/auto-merge-dependabot-pr.yml
secrets: inherit
Expand Down

0 comments on commit 7c44850

Please sign in to comment.