Initialize CI #7
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Change NODE_ENV to install all dependencies | |
run: echo "NODE_ENV=development" >> $GITHUB_ENV | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: Upgrade npm | |
run: npm install -g npm@latest | |
- name: Clear npm cache | |
run: npm cache clean --force | |
- name: Install dependencies | |
run: npm install | |
- name: Run unit tests | |
run: npm run test |