Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update solar-system.yml #32

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 76 additions & 22 deletions .github/workflows/solar-system.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Workflow file
1. This yaml has 2 jobs
2. Varibales has been defined in workflow level

name: Solar System Workflow

on:
Expand All @@ -7,27 +11,77 @@ on:
- main
- 'feature/*'

env:
MONGO_URI: 'mongodb+srv://supercluster.d83jj.mongodb.net/superData'
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@v4
with:
node-version: 20

- name: Install Dependencies
run: npm install

- name: Unit Testing
run: npm test
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@v4
with:
node-version: 20

- name: Install Dependencies
run: npm install

- name: Unit Testing
run: npm test

- name: Archive Test Result
uses: actions/upload-artifact@v4
with:
name: Mocha-Test-Result
path: test-results.xml
- name: Archive Test Result
if: always()
uses: actions/upload-artifact@v4
with:
name: Mocha-Test-Result
path: test-results.xml

code-coverage:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup NodeJS Version
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install Dependencies
run: npm install

- name: Run Coverage
continue-on-error: true
run: npm run coverage

- name: Upload Coverage Results
uses: actions/upload-artifact@v4
with:
name: Code-Coverage-Result
path: coverage
retention-days: 5

dev-deploy:
needs: docker
runs-on: ubuntu-latest
environment:
name: development
steps:
- uses: actions/checkout@v4
- uses: azure/setup-kubectl@v3
with:
version: v1.26.0
- uses: azure/k8s-set-context@v3
with:
method: kubeconfig
kubeconfig: '${{ secrets.KUBECONFIG }}'
- run: kubectl version --short -o yaml