docs: update example #9
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: integration | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| integration: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.21' | |
| - name: Start services | |
| run: docker compose up -d | |
| - name: Show service status | |
| run: docker compose ps | |
| - name: Run integration tests | |
| env: | |
| RUN_INTEGRATION: 1 | |
| run: go test -tags integration ./... | |
| - name: Dump service logs on failure | |
| if: failure() | |
| run: docker compose logs --no-color | |
| - name: Tear down | |
| if: always() | |
| run: docker compose down -v |