Extend CRISP Functionalities For Public GitHub Repositories #202
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Backend CI | |
on: | |
pull_request: | |
branches: [ main, staging ] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./backend | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
cache-dependency-path: './backend/package-lock.json' | |
- name: Install dependencies | |
run: npm ci | |
- name: Check formatting | |
run: npm run prettier-check | |
- name: Build | |
run: npm run build --if-present | |
- name: Run tests | |
run: npm run test | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4.0.1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: NUS-CRISP/CRISP |