Add outbox usage guide #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: test | |
| POSTGRES_PASSWORD: test | |
| POSTGRES_DB: test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U test -d test" | |
| --health-interval 2s | |
| --health-timeout 5s | |
| --health-retries 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # caqti-driver-postgresql links against libpq. | |
| - name: Install system dependencies | |
| run: sudo apt-get update && sudo apt-get install -y libpq-dev | |
| - name: Set up OCaml | |
| uses: ocaml/setup-ocaml@v3 | |
| with: | |
| ocaml-compiler: "5.4" | |
| - name: Install opam dependencies | |
| run: opam install . --deps-only --with-test --yes | |
| - name: Build | |
| run: opam exec -- dune build | |
| - name: Run tests | |
| env: | |
| TEST_DATABASE_URL: postgresql://test:test@localhost:5432/test | |
| run: opam exec -- dune runtest |