Db retries #1
Workflow file for this run
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: Run Chaos Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| types: | |
| - ready_for_review | |
| - opened | |
| - reopened | |
| - synchronize | |
| workflow_dispatch: | |
| jobs: | |
| chaos-test: | |
| runs-on: ubuntu-latest | |
| services: | |
| # Postgres service container | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| # Specify the password for Postgres superuser. | |
| POSTGRES_PASSWORD: a!b@c$d()e*_,/:;=?@ff[]22 | |
| # Set health checks to wait until postgres has started | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| # Maps tcp port 5432 on service container to the host | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25.x' | |
| - name: Cache Go modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/go/pkg/mod | |
| ~/.cache/go-build | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Install gotestsum | |
| run: go install gotest.tools/gotestsum@latest | |
| - name: Install Docker (for PostgreSQL management in chaos tests) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y docker.io | |
| sudo systemctl start docker | |
| sudo usermod -a -G docker $USER | |
| - name: Run chaos tests | |
| run: go vet ./... && gotestsum --format github-action -- -race -v -count=1 -timeout=30m ./... | |
| working-directory: ./chaos_tests | |
| env: | |
| PGPASSWORD: a!b@c$d()e*_,/:;=?@ff[]22 | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| DBOS_SYSTEM_DATABASE_URL: "postgres://postgres:a!b@c$d()e*_,/:;=?@ff[]22@localhost:5432/dbos?sslmode=disable" |