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

Feature/workflow #9

Open
wants to merge 6 commits 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
30 changes: 29 additions & 1 deletion .github/workflows/solar-system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ jobs:
unit-testing:
name: Unit Testing
runs-on: ubuntu-latest
env:
MONGO_URI: mongodb+srv://supercluster.d83jj.mongodb.net/superData
MONGO_USERNAME: superuser
MONGO_PASSWORD: ${{ secrets.MONGO_PASSWORD }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -27,7 +31,31 @@ jobs:
run: npm test

- name: Archive Test Result
if: always()
uses: actions/upload-artifact@v3
with:
name: Mocha-Test-Result
path: test-results.xml
path: test-results.xml
code-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install
- continue-on-error: true
run: npm run coverage
- uses: actions/upload-artifact@v3
with:
name: Code-Coverage-Result
path: coverage
retention-days: 5
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: '${{ runner.os }}-node-modules-${{ hashFiles(''package-lock.json'') }}'