Skip to content

#11 ch: Setup CI workflow for testing, coverage reporting, building and linting #6

#11 ch: Setup CI workflow for testing, coverage reporting, building and linting

#11 ch: Setup CI workflow for testing, coverage reporting, building and linting #6

Workflow file for this run

name: knights-ecomm-be CI
on: [push, pull_request]
jobs:
build-lint-test-coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Install dependencies
run: npm install
- name: Run ESLint and Prettier
run: npm run lint
- name: Build project
run: npm run build --if-present
- name: Run tests
run: npm test
- name: Upload coverage report to Coveralls
uses: coverallsapp/github-action@v2.2.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}