Skip to content

ci(gh-actions): cleanup workflow definitions #50

ci(gh-actions): cleanup workflow definitions

ci(gh-actions): cleanup workflow definitions #50

Workflow file for this run

name: Test and Build
on:
pull_request:
push:
branches: [ latest ]
permissions:
contents: read
jobs:
build:
name: Test and Build (Node.js v${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version:
- 18
- 20
- 21
- 22
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}.x
- name: Install dependencies
run: npm install
- name: Run Lint
run: npm run lint
- name: Run Test
run: npm run test
- name: Report Codacy coverage
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./coverage/lcov.info
- name: Run Build
run: npm run build
- name: Audit, fix outdated dependencies and rebuild
run: |
npm list --outdated
npm audit || true
npm audit fix || true
npm list --outdated
npm run build
trigger-release:
if: github.ref == 'refs/heads/latest'
name: Trigger release on latest
needs: build
uses: ./.github/workflows/release.yml
secrets: inherit
permissions:
contents: write
issues: write
pull-requests: write
id-token: write