Files
CollabTable/.github/workflows/tests.yml
T
Gabriel20xx f56eac28f7
Lint / Lint (push) Successful in 31s
Build & Push Docker Image / Docker Build & Push (push) Successful in 6m14s
Tests / Test (push) Successful in 12s
feat: add CI workflows for linting, testing, and Docker image build & push
2026-08-01 18:46:27 +02:00

52 lines
1.1 KiB
YAML

name: Tests
on:
push:
branches:
- "**"
paths:
- 'CollabTableServer/**'
- '.github/workflows/tests.yml'
pull_request:
branches:
- main
- master
paths:
- 'CollabTableServer/**'
- '.github/workflows/tests.yml'
workflow_dispatch: {}
jobs:
test:
name: Test
runs-on: ubuntu-latest
defaults:
run:
working-directory: CollabTableServer
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: CollabTableServer/package-lock.json
- name: Install dependencies
run: npm ci
- name: Run tests
run: |
if find src -iname '*.test.ts' -o -iname '*.spec.ts' | grep -q .; then
echo "Test files found for CollabTableServer — running npm test."
npm test
else
echo "No test suite configured for CollabTableServer yet — skipping."
exit 0
fi