-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (45 loc) · 1.41 KB
/
testing.yml
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
45
46
47
48
name: Unit Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
tests:
runs-on: ubuntu-latest
env:
MY_SALT: ${{ secrets.SALT }}
MY_DB: ${{ secrets.DB }}
MY_JWTPRIVATEKEY: ${{ secrets.JWTPRIVATEKEY }}
MY_RAZORPAY_KEY_ID: ${{ secrets.RAZORPAY_KEY_ID }}
MY_RAZORPAY_KEY_SECRET: ${{ secrets.RAZORPAY_KEY_SECRET }}
MY_CLOUDNARY_API_KEY: ${{ secrets.CLOUDNARY_API_KEY }}
MY_CLOUDNARY_API_SECREAT: ${{ secrets.CLOUDNARY_API_SECREAT }}
MY_CLOUDNARY_API_NAME: ${{ secrets.CLOUDNARY_API_NAME }}
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm intsall
run: npm i
- name: Manage .env
run: |
source cicd.sh
source cicd.sh > ./server/.env
source cicd.sh > ./.env
cat ./server/.env
- name: tests
run: |
cd server
npm i --force
cd ..
pwd
npm test
cat log.txt