File tree Expand file tree Collapse file tree 3 files changed +77
-423
lines changed
cmd/dbos/templates/dbos-toolbox Expand file tree Collapse file tree 3 files changed +77
-423
lines changed Original file line number Diff line number Diff line change 1+ name : Run Chaos Tests
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ types :
10+ - ready_for_review
11+ - opened
12+ - reopened
13+ - synchronize
14+ workflow_dispatch :
15+
16+ jobs :
17+ chaos-test :
18+ runs-on : ubuntu-latest
19+ services :
20+ # Postgres service container
21+ postgres :
22+ image : postgres:16
23+ env :
24+ # Specify the password for Postgres superuser.
25+ POSTGRES_PASSWORD : a!b@c$d()e*_,/:;=?@ff[]22
26+ # Set health checks to wait until postgres has started
27+ options : >-
28+ --health-cmd pg_isready
29+ --health-interval 10s
30+ --health-timeout 5s
31+ --health-retries 5
32+ ports :
33+ # Maps tcp port 5432 on service container to the host
34+ - 5432:5432
35+
36+ steps :
37+ - uses : actions/checkout@v5
38+ with :
39+ fetch-depth : 0
40+ fetch-tags : true
41+
42+ - name : Setup Go
43+ uses : actions/setup-go@v5
44+ with :
45+ go-version : ' 1.25.x'
46+
47+ - name : Cache Go modules
48+ uses : actions/cache@v4
49+ with :
50+ path : |
51+ ~/go/pkg/mod
52+ ~/.cache/go-build
53+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
54+ restore-keys : |
55+ ${{ runner.os }}-go-
56+
57+ - name : Download dependencies
58+ run : go mod download
59+
60+ - name : Install gotestsum
61+ run : go install gotest.tools/gotestsum@latest
62+
63+ - name : Install Docker (for PostgreSQL management in chaos tests)
64+ run : |
65+ sudo apt-get update
66+ sudo apt-get install -y docker.io
67+ sudo systemctl start docker
68+ sudo usermod -a -G docker $USER
69+
70+ - name : Run chaos tests
71+ run : go vet ./... && gotestsum --format github-action -- -race -v -count=1 -timeout=30m ./...
72+ working-directory : ./chaos_tests
73+ env :
74+ PGPASSWORD : a!b@c$d()e*_,/:;=?@ff[]22
75+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
76+ DBOS_SYSTEM_DATABASE_URL : " postgres://postgres:a!b@c$d()e*_,/:;=?@ff[]22@localhost:5432/dbos?sslmode=disable"
Original file line number Diff line number Diff line change 11module {{.ProjectName}}
22
3- go 1.22.0
4-
5- toolchain go1.25.0
3+ go 1.22.0
You can’t perform that action at this time.
0 commit comments