Update auto-merge.yml #93
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 - Unit Tests | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
branches: | |
- main | |
- develop | |
jobs: | |
run-unit-tests: | |
name: Run Unit Tests | |
runs-on: ubuntu-latest | |
env: | |
NODE_ENV: test | |
JWT_SECRET: ${{ secrets.JWT_SECRET }} | |
JWT_EXPIRES_IN: 86400 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set Up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
- name: Cache node modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install Dependencies | |
run: npm ci | |
- name: Run Unit Tests | |
run: npm run test:unit |