Skip to content

tests: Added unit test for card use-cases #14

tests: Added unit test for card use-cases

tests: Added unit test for card use-cases #14

Workflow file for this run

name: API CI
on:
push:
branches:
- main
- develop
- tests
paths:
- "api/**"
- ".github/workflows/api-ci.yml"
pull_request:
branches:
- main
- develop
- tests
paths:
- "api/**"
- ".github/workflows/api-ci.yml"
defaults:
run:
working-directory: ./api
jobs:
linter:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci
- name: Run linter
run: npm run lint
unit-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
cache-dependency-path: package-lock.json
- name: Setup environment variables
run: |
echo "JWT_SECRET_VERIFY_EMAIL=test-EMAIL-secret" >> $GITHUB_ENV
echo "JWT_ACCESS_SECRET=test-ACCESS-secret" >> $GITHUB_ENV
echo "JWT_REFRESH_SECRET=test-REFRESH-secret" >> $GITHUB_ENV
echo "NODE_ENV=development" >> $GITHUB_ENV
- name: install dependencies
run: npm ci
- name: run unit tests
run: npm run test