Struggling to create a workflow

I’m trying to get my automated testing set up for this project and I can’t get the workflow to run. Things I’ve checked:

  • tests are running locally when I call the commands in the test.yml file
  • file is in myrepo/.github/workflows/test.yml
  • Local and remote branch are both main
  • Workflow also didn’t run when I did a pull request
  • I’ve tried a few different methods of checking the syntax

The code has pushed and it’s in the repo; there’s just no tests being run.

The code:

name: Test
on: [push]

jobs:
  test:
    name: Test
    runs-on: ubuntu-16.04
    steps:
      - uses: actions/checkout@v2
      - name: Install Dependencies
        run: npm ci
      - name: Unit Tests
        run: npm test --watchAll=false
      - name: E2E Tests
        uses: cypress-io/github-action@v2
        with:
          start: npm start
          wait-on: 'http://localhost:8000'

Thanks for any help.

Is this in a public repo anywhere, where I can check it out?

It didn’t trigger on a pull request because you have the trigger set to just “push”.

I don’t have much experience with the Cypress action.

Thanks for reply. I just made it public: GitHub - ccsdevio/ceramoni-gatsby: gatsby site for ceramoni.shop; client: Maggie Bencivenga

I appreciate the help!

I think you nested everything one layer down too far. workflows have to be in the .github/workflows folder directly off teh root

Oh good call. Thank you. I remember reading a tweet about how the longer it takes to find a bug/error, the stupider and more obvious it is. I am feeling that right now🤦🏻‍♂️ Thanks for your help!