Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Abstract Database Access #51

Abstract Database Access

Abstract Database Access #51

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.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"
- name: Install dependencies
run: |
npm i
cd client && npm i
cd ../server && npm i
- name: Run linter
run: npm run lint
- name: Run tests
run: npm test
- name: Test server if present
run: |
if [ -f server/package.json ] && grep -q '"test"' server/package.json; then
echo "Running server tests..."
cd server && npm test
else
echo "No server tests found"
fi
- name: Check coverage thresholds
run: npm run test:coverage:ci
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: "22.x"
cache: "npm"
- name: Install dependencies
run: |
npm i
cd client && npm i
cd ../server && npm i
- name: Build
run: |
cd client && npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-files
path: |
build/
dist/
retention-days: 7