Skip to content

Commit

Permalink
ci: update x3
Browse files Browse the repository at this point in the history
  • Loading branch information
Bugs5382 committed Jun 25, 2024
1 parent d233965 commit c39b394
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/dependabot-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ permissions:
jobs:
Dependabot:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 20.x, 'lts/*' ]
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
Expand All @@ -22,6 +25,12 @@ jobs:
skip-commit-verification: true
- name: Checkout repository
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm install --ignore-scripts
- name: Approve PR, if not already approved
run: |
gh pr checkout "$PR_URL"
Expand All @@ -35,7 +44,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Run unit tests
run: |
npm test
npm run test
- name: Aggregate Dependabot PRs
id: aggregate_prs
run: |
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/pr-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,29 @@ jobs:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dorny/[email protected]
id: filter
with:
filters: |
src:
- 'src/**'
test:
- '__tests__/**'
- name: Use Node.js ${{ matrix.node-version }}
if: steps.filter.outputs.src == 'true' && steps.filter.outputs.test == 'true'
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
if: steps.filter.outputs.src == 'true' && steps.filter.outputs.test == 'true'
run: npm install --ignore-scripts
- name: Run Lint Fix
run: npm run lint:fix
- name: Run Lint
if: steps.filter.outputs.src == 'true' && steps.filter.outputs.test == 'true'
run: npm run lint
- name: Run Unit Tests
if: steps.filter.outputs.src == 'true' && steps.filter.outputs.test == 'true'
run: npm run test
- name: Check test results
if: steps.filter.outputs.src == 'true' && steps.filter.outputs.test == 'true'
run: exit ${{ steps.Test.outputs.test_result }}
id: check_test_result

0 comments on commit c39b394

Please sign in to comment.