Skip to content

feat: update workflow #10

feat: update workflow

feat: update workflow #10

Workflow file for this run

name: CI
on:
pull_request:
branches: [main, develop]
push:
branches: [main]
jobs:
test-and-lint:
name: Test and Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Security audit
run: npm audit
- name: Run linting
run: npm run lint
- name: Run unit tests
run: npm run test:unit -- --coverage
- name: Run integration tests
run: npm run test:integration -- --coverage
- name: Build application
run: npm run build
- name: Start test server
run: npm run start:test & sleep 5
env:
PORT: 3001
NODE_ENV: test
- name: Run API tests
run: npm run test:api -- --coverage
- name: Stop test server
run: npm run stop:test
- name: Upload coverage reports
if: success()
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage/
if-no-files-found: error