31 lines
761 B
YAML
31 lines
761 B
YAML
name: Pull Request
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
check:
|
|
# The type of runner that the job will run on
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node: [ 18, 20 ]
|
|
|
|
name: Node ${{ matrix.node }} PR
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Run linting rules and tests
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
cache: 'pnpm'
|
|
- run: pnpm install
|
|
name: install dependencies
|
|
- run: pnpm lint
|
|
name: linting
|
|
- run: pnpm test
|
|
name: testing
|
|
- name: 'Report Coverage'
|
|
if: always() # Also generate the report if tests are failing
|
|
uses: davelosert/vitest-coverage-report-action@v2 |