Application successfully passes tests in Github Actions, however, the process is terminated with exit code

My tests are passing successfully, but the process exits with code 1. I am unsure of what could be causing this issue. Below is a link to my GitHub actions file as well as an image demonstrating the tests passing with an exit code.

Interestingly, when I run individual tests using -t, they pass without any issues. However, all tests result in an exit code of 1.

testpass

on:
  push:
    branches:
      - main
      - staging
      - dev
  pull_request:
    branches:
      - main
      - staging
      - dev

jobs:
  tests:
    name: Tests
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Read nvmrc
        id: nvmrc
        uses: browniebroke/read-nvmrc-action@v1

      - name: Set up node
        uses: actions/setup-node@v2
        with:
          node-version: '${{ steps.nvmrc.outputs.node_version }}'

      - name: Install dependencies
        run: yarn install --frozen-lockfile

      - name: Run tests
        run: yarn test

Answer №1

After some investigation, I successfully resolved the issue at hand. It turned out that one of the tests was passing but encountering an error during a particular step. By addressing and fixing the test, I was able to resolve the aforementioned problem. Subsequently, the job proceeded to run smoothly without any further issues.

Answer №2

When I experienced the issue, it was due to the absence of executed tests in my project (lacking spec.ts files). As a result, there were 0/0 successful tests performed, leading to a non-zero exit code.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Implement a mechanism for updating a child property whenever the parent state changes

In my setup, there's a parent state that includes a 'Theme' state. Current layout looks like this: The Parent Component holds the state of Theme. The Parent component passes down the current state to the child component as a "theme" prop ...

Guide To Implementing HTML Geolocation API in Nativescript Vue Using WebView

I am completely new to nativescript-vue and I have been experimenting with my codes on stackblitz. I decided to use a webview to load an HTML page, but unfortunately, the HTML geolocation API is not functioning correctly. Can anyone provide some guidance o ...

Sorting can be done in a table that is scrollable

Can someone recommend a sortable table with scrolling and a fixed header? I'm looking for a solution that can be implemented using either jQuery or plain JavaScript. Your input is greatly appreciated. Thank you! ...

Do you need to define a schema before querying data with Mongoose?

Is it necessary to adhere to a model with a schema before running any query? And how can one query a database collection without the schema, when referred by the collection name? This scenario is demonstrated in an example query from the Mongoose document ...

relocate information to another div when the page is resized

I am working on a design where all the text is inside one div on mobile and tablets, but on desktop, the p tags move to the div below it. Each div has its own unique background image. Here's how the markup looks like: <main> <div class= ...

Mastering the Art of Managing AJAX Requests with EXTJS

I have a code to send an AJAX request that appears to be functioning correctly under firebug, sending the correct parameters: Ext.Ajax.request({ url: 'test', params:{name: "bunya"}, success: function(resp){ ...

How to utilize the async pipe on an observable<Object> and connect it to a local variable in the HTML using Angular

Hey there! So, I have this observable called user$ which has a bunch of properties such as name, title, and address. component{ user$:Observable<User>; constructor(private userService:UserService){ this.user$ = this.userService.someMethodRet ...

Struggling to make HTML5 geolocation coordinates function properly

I've attempted to work with examples in this code snippet, but I'm struggling to make the html5 geolocation coordinates function properly. Everything works fine when I hardcode the coordinates. var infowindow; var map; function initialize() ...

Initiate an Ajax request solely for the elements currently visible on the screen

I am currently facing an issue that requires a solution. Within our template, there are multiple divs generated with the same classes. Each div contains a hidden input field with the ID of the linked target site. My task is to utilize this ID to make aja ...

Combine two arrays into a single array object

I have an item containing the following data: "Item": { "data1": [], "data2": [ "5", "6", "7", "8" ] } Upon inspecting my item, I noticed that it consists of two sections. This is understandable since there ar ...

Problem encountered with a selection menu

I'm experiencing some trouble with the dropdown menu. Whenever I try to move the mouse to access the dropdown menu, it seems unresponsive. I attempted adjusting the padding on a line of code but ended up moving the entire line instead. Here is the cod ...

Having multiple instances of jQuery running concurrently on a single webpage

I am a novice when it comes to jQuery and I'm facing some issues with it. I have a basic slideshow and a weather plugin that I would like to incorporate, but strangely they both seem to malfunction when used together. <script src="js/jquery.js"> ...

What is the process for accessing a file within a NWJS or Electron application?

Imagine a notepad app with editing capabilities that utilizes the Code Mirror library. Since the app is built using NWJS, I am unsure how to directly open a text file within my app. In other native apps, you can typically select an option in the context ...

Identifying an Android device using Javascript or jQuery

Is there a way to identify an Android device for styling a mobile website? I want to add specific CSS styles for users on the Android platform. Appreciate any help! ...

Retrieving MongoDB Records in Meteor

Currently, I am attempting to wrap my head around Meteor's method of returning database records. Here is the code snippet that I have been working with: Template.body.helpers({ items(){ return Items.find({}); }, json(){ console.log(this ...

Updates to $scope are not reflecting in the application

My input includes a datalist that is populated by an angular get request as the page loads. <input list="data" /> <datalist id="data"> <option ng-repeat="item in items" value="{{item.data}}"> </datalist> The $http call is straig ...

Notify immediately if there is any clicking activity detected within a designated div container

I am looking to trigger an alert when a specific div is clicked. Here is the scenario: <div class="container"> <div class="header"> <h1>Headline<h1> </div> <div class="productbox"></div> </div> I have succ ...

I'm currently working on storing my data in a Node.js REST API, but I keep encountering an issue with the error message "req.status is not a function"

router.post('/savedata',function(req, res){ console.log(req.body); var data={ firstname:req.body.firstname, lastname:req.body.firstname, password:req.body.password, email:req.body.email, created:req ...

Prevent the initial delay caused by setTimeout

I am currently working on a script to incorporate floating clouds on my website. However, I am facing an issue where the first cloud appears with a delay of 10-12 seconds due to the setTimeout function in spawn_cloud_loop. Is there a way to add the first c ...

Displaying a DIV after entering text into an <input> field using JavaScript

Attempting to create a JavaScript function that will show/hide a 'DIV' after entering some text into an input field. I have successfully written the function, but I am struggling to make it only work when the user enters a value greater than 8. ...