Foundation 2.4.1 - GitHub Action failed to run

I am working on the Foundation Certificate and am currently on module 2.4.1. The task at hand is Adding Checks to a Pipeline using GitHub Actions. The module has guided me step by step through adding a folder and a file/script to run the checks as part of the pipeline.

When i push my code to trunk via github desktop, the job starts. However it has now ended in failure twice. Does anyone have any suggestions what I may be doing wrong? Should my script state the NodeJS version as 18.x or should i have updated this to be the actual version on my machine?

Here is a screenshot of the errors and also the script I have pushed to trunk.

1 Like

Could you share a bit more about what failed in the build exactly. I can then help diagnose your issue.

2 Likes

Thanks Mark.

Will it help you to look at my GitHub repo directly? GitHub - Philippa-Jennings/mot-cert-support-app-js: JavaScript support app that is used for the Ministry of Testing Automation courses

2 Likes

Hi @philippa

Try replacing line 26 of this file with the following code:

curl --head -X GET --retry 60 --retry-connrefused --retry-delay 1 http://localhost:3000
1 Like

I have added this line of code, but unfortunately it doesnt appear to have solved the issue. Please can I ask you to take a look at the latest workflow in my Actions on my repo.

The tests definitely pass when run one at a time on my local machine.

And these tests run locally without issue?

My apologies … it appears it only works if i have it running with header and if I have already loaded the webpage into my browser before running the test.

As i had a week off between writing the test and then revisiting the course, I had forgotten to finish writing the test properly.

Ive finally managed to get the tests to run as part of the pipeline :smiley: