dummy pull req 2 #23
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: 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 ci | |
- 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 |