Rayrun
← Back to Discord Forum

Problem with Github Actions

Hi folks! As per the title, I'm having some issues with getting the Github Actions to run properly. I'm basically just using the yaml file provided in the documentation.

The problem is that the feedback I'm getting is not helping me particularly much. All the previous steps: installing dependencies, installing browsers... they all go through just fine and I'm told that until about a month or 2 ago ( I joined recently ) their CI actually worked. Eventually they started having issues with the tests and, due to lack of resources, just commented out the github actions script, continued working on the app and ran the automation manually, until i joined.

Now that I'm trying to bring the automation back though... I'm getting this error even before the tests can actually run, previously the script would at least run and then some specific tests would fail, now it doesn't even get to that point as per the error pasted below. I'll also paste the yaml file for reference though there doesn't seem to be anything particularly meaningful that has been changed there.

Any help is deeply appreciated.

Run npx playwright test --shard=1/3
  npx playwright test --shard=1/3
  shell: /usr/bin/bash -e {0}

[WebServer] npm[WebServer]  ERR! Missing script: "start"
npm ERR! 
npm ERR! Did you mean one of these?
npm ERR!     npm star # Mark your favorite packages
npm ERR!     npm stars # View packages marked as favorites
npm ERR! 
npm ERR! To see a list of scripts, run:
npm ERR!   npm run
[WebServer] 
[WebServer] npm [WebServer] ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2023-06-16T21_32_13_558Z-debug-0.log

Error: Process from config.webServer was not able to start. Exit code: 1

Error: Process completed with exit code 1.```


```name: Playwright Tests
on: push
jobs:
 test:
   strategy:
     matrix:
       shard: [1, 2, 3]
   timeout-minutes: 60
   runs-on: ubuntu-latest
   steps:
   - uses: actions/checkout@v3
   - uses: actions/setup-node@v3
     with:
       node-version: 16
   - name: Install dependencies
     run: npm ci
   - name: Install Playwright Browser
     run: npx playwright install --with-deps chromium
   - name: Run Playwright tests
     run: npx playwright test --shard=${{ matrix.shard }}/${{ strategy.job-total }}
   - uses: actions/upload-artifact@v3
     if: always()
     with:
       name: playwright-report
       path: playwright-report/
       retention-days: 30

This thread is trying to answer question "What is causing the error message in Github Actions and how can it be resolved?"

2 replies

in your playwright.config you have a webserver entry which you either have to comment out or need to fix, since the npm run start command does not exist in your package.json.

@mxschmitt: Thank you!!! That was so much faster than I expected.

Thank you!!! That was so much faster than I expected.

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].