I’ve written a simple action that runs tests in a docker container.
Sometimes users of the action will want to be able to connect to a database for the tests. I’ve tried this and it doesn’t work, does anyone know why?
name: On Prs on: [pull_request] jobs: run_tests: runs-on: ubuntu-latest services: postgres: image: postgres:11-alpine env: POSTGRES_USER: monster POSTGRES_PASSWORD: monster ports: - "54321:5432" # needed because the postgres container does not provide a healthcheck options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 10 steps: - uses: actions/checkout@v2 - name: "run dem tests" uses: Adzzemail@example.com
My app is configured correctly to listen to the correct port 54321 and it has a db password and user of monster.
Is there something obvious I am missing?