Merge branch 'main' of https://github.com/cepdnaclk/e19-3yp-impact-tr… #645
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: Node.js CI | |
on: | |
push: | |
branches: ["main", "dev"] | |
pull_request: | |
branches: ["main", "dev"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.x, 16.x, 18.x] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Set Node.js version and Install Dependencies | |
run: | | |
cd code/backend | |
npm ci | |
shell: bash | |
env: | |
NODE_VERSION: ${{ matrix.node-version }} | |
- name: Build and Run | |
run: | | |
npm run build --if-present | |
npx jest | |
working-directory: code/backend |