Skip to content

Commit

Permalink
env3
Browse files Browse the repository at this point in the history
  • Loading branch information
mu7med authored Dec 31, 2023
1 parent 857aab8 commit f16f0a5
Showing 1 changed file with 31 additions and 26 deletions.
57 changes: 31 additions & 26 deletions .github/workflows/solar-system.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Solar System Workflow

on:
'on':
workflow_dispatch:
push:
branches:
Expand All @@ -11,27 +10,33 @@ env:
MONGO_USERNAME: superuser
MONGO_PASSWORD: '${{ secrets.MONGO_PASSWORD }}'
jobs:
unit-testing:
name: Unit Testing
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup NodeJS Version
uses: actions/setup-node@v3
with:
node-version: 20

- name: Install Dependencies
run: npm install

- name: Unit Testing
run: npm test

- name: Archive Test Result
if: always()
uses: actions/upload-artifact@v3
with:
name: Mocha-Test-Result
path: test-results.xml
unit-testing:
name: Unit Testing
runs-on: ubuntu-latest
container:
image: 'node:18'
env:
MONGO_URI: 'mongodb://mongo:27017/superData'
MONGO_USERNAME: non-prod-user
MONGO_PASSWORD: non-prod-password
services:
mongo:
image: 'siddharth67/mongo-db:non-prod'
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: '${{ runner.os }}-node-modules-${{ hashFiles(''package-lock.json'') }}'
- name: Install Dependencies
run: npm install
- name: Unit Testing
run: npm test
- name: Archive Test Result
if: always()
uses: actions/upload-artifact@v3
with:
name: Mocha-Test-Result
path: test-results.xml

0 comments on commit f16f0a5

Please sign in to comment.