Skip to content

Trigger workflow only on source file changes #15

Trigger workflow only on source file changes

Trigger workflow only on source file changes #15

Workflow file for this run

name: CI
on:
push:
branches: [ main, master ]
paths:
- 'src/**'
- 'tests/**'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- 'vitest.config.ts'
- '.github/workflows/ci.yml'
pull_request:
branches: [ main, master ]
paths:
- 'src/**'
- 'tests/**'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- 'vitest.config.ts'
- '.github/workflows/ci.yml'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm test