I am going through GitHub Actions course, and in , Configure Unit Testing chapter’s workflow I am trying to mimic the demonstration. Here is my workflow code so far:-
name: Solar System workflow
on:
workflow_dispatch:
push:
branches:
- main
- 'feature/*'
env:
MONGO_URI: 'mongodb+srv://supercluster.d83jj.mongodb.net/superdata'
MONGO_USERNAME: ${{ vars.MONGO_USERNAME }}
MONGO_PASSWORD: ${{ secrets.MONGO_PASSWORD }}
jobs:
unit-testing:
strategy:
matrix:
os: [ubuntu-latest]
name: Unit esting
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup NodeJS Version -18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies
run: npm install
- name: Unit Testing
run: npm run test
However, Unit Testing step is failing every time. Here is the logs:-
When I ran npm run test && echo $?
in my localhost it is also gave same error. What I am missing here?