Skip to content

Quick test to trigger detect-test-groups action #21

Quick test to trigger detect-test-groups action

Quick test to trigger detect-test-groups action #21

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Build TypeScript project
run: npm run build
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Run ESLint
run: npm run lint
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Check Prettier formatting
run: npm run format
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20, 21]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Run tests with coverage
run: npm test -- --coverage
- name: Display coverage summary
run: npx jest --coverage --coverageReporters=text-summary
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: "coverage-report-node${{ matrix.node-version }}-${{ github.run_id }}"
path: coverage/
detect-test-groups:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'pull_request'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run custom test group filter action
uses: ./.github/actions/filter-tests
id: filter
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Print filtered test groups
run: 'echo "Detected test groups: ${{ steps.filter.outputs.test-groups }}"'