I’m having trouble setting up a GitHub Workflow that would allow for automated application testing.
I’ve created .github/workflows directory in the root of my project, and inside of that directory I’ve created tests.yml file.
I need a Postgres DB for my application to start, and run the tests. I followed the article here
Repository code is contained in is private, and belongs to an organisation I am an Admin of.
Contents of my tests.yml look like this:
name: tests on: [push, pull_request] jobs: container-job: container: "swift:latest" runs-on: ubuntu-latest uses: actions/checkout@v2 services: postgres: env: POSTGRES_DB: example-db POSTGRES_PASSWORD: example POSTGRES_USER: example image: postgres options: "--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5" steps: - name: "Check out repository code" uses: actions/checkout@v2 - name: "Run Swift Tests" run: "swift test --enable-test-discovery --sanitize=thread" env: DATABASE_HOST: postgres DATABASE_PASSWORD: example DATABASE_PORT: 5432 DATABASE_USERNAME: example
Upon commit, GitHub tries to run the workflow, but fails with this message:
Error : .github#L1 invalid value workflow reference: references to workflows must be rooted in '.github/workflows'
I also receive an email that says
.github/workflows/tests.yml: No jobs were run
Could anyone please advise what an issue is? Is it something to do with repository being private & GitHub Actions Workflow not having sufficient permissions? I’m really confused as the .github/workflows/tests.yml seems to be exactly where it needs to be.
Thank you for your help in advance!