safeql icon indicating copy to clipboard operation
safeql copied to clipboard

Add documentation for CI

Open Newbie012 opened this issue 3 years ago • 3 comments

I should probably add basic documentation of how to run SafeQL in CI

Newbie012 avatar Oct 17 '22 15:10 Newbie012

We have it running in GitHub Actions like this:

https://github.com/upleveled/security-vulnerability-examples-next-js-postgres/blob/8d0e4af69fb97c2e482f6c8fb183c58d8dd20cd7/.github/workflows/lint-check-types-build.yml

karlhorky avatar Oct 26 '22 15:10 karlhorky

Interesting... I'm using the following service for the CI in the project:

jobs:
  check:
    runs-on: ubuntu-latest
    services:
      postgres:
        image: postgres:14
        env:
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: postgres
          POSTGRES_DB: postgres
        ports:
          - 5432:5432
        options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

I'm not sure what's the better approach here.

Newbie012 avatar Oct 26 '22 21:10 Newbie012

Seems like your approach offers a bit more configurability, but may be a bit slower to start.

karlhorky avatar Oct 27 '22 09:10 karlhorky