Skip to content

Trigger workflow only on source file changes #8

Trigger workflow only on source file changes

Trigger workflow only on source file changes #8

Workflow file for this run

name: Tests
on:
push:
branches: [ main ]
paths:
- 'src/**'
- '__tests__/**'
- '*.ts'
- '*.js'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- 'vitest.config.ts'
- '.github/workflows/test.yml'
pull_request:
branches: [ main ]
paths:
- 'src/**'
- '__tests__/**'
- '*.ts'
- '*.js'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- 'vitest.config.ts'
- '.github/workflows/test.yml'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'npm'
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Run tests
run: npm test