File size: 1,024 Bytes
3b6afc0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Backend Unit Tests
on:
  push:
    branches:
      - main
      - dev
      - release/*
  pull_request:
    branches:
      - main
      - dev
      - release/*
jobs:
  tests_Backend:
    name: Run Backend unit tests
    timeout-minutes: 60
    runs-on: ubuntu-latest
    env:
      MONGO_URI: ${{ secrets.MONGO_URI }}
      OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
      JWT_SECRET: ${{ secrets.JWT_SECRET }}
      CREDS_KEY: ${{ secrets.CREDS_KEY }}
      CREDS_IV: ${{ secrets.CREDS_IV }}
    steps:
      - uses: actions/checkout@v2
      - name: Use Node.js 19.x
        uses: actions/setup-node@v3
        with:
          node-version: 19.x
          cache: 'npm'

      - name: Install dependencies
        run: npm ci

      # - name: Install Linux X64 Sharp
      #   run: npm install --platform=linux --arch=x64 --verbose sharp

      - name: Run unit tests
        run: cd api && npm run test:ci

      - name: Run linters
        uses: wearerequired/lint-action@v2
        with:
          eslint: true