feat: add CI workflows for linting, testing, and Docker image build & push
This commit is contained in:
1 parent
b150d835a1
commit
f56eac28f7
4 files changed
+161
-73
No files matched your search
@@ -0,0 +1,51 @@
|
||||
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
|
||||
Reference in new issue
Block a user