File tree Expand file tree Collapse file tree 1 file changed +66
-0
lines changed Expand file tree Collapse file tree 1 file changed +66
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Run Go Tests
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+ types :
11+ - ready_for_review
12+ - opened
13+ - reopened
14+ - synchronize
15+ workflow_dispatch :
16+
17+ jobs :
18+ test :
19+ runs-on : ubuntu-latest
20+ services :
21+ # Postgres service container
22+ postgres :
23+ image : postgres:16
24+ env :
25+ # Specify the password for Postgres superuser.
26+ POSTGRES_PASSWORD : a!b@c$d()e*_,/:;=?@ff[]22
27+ # Set health checks to wait until postgres has started
28+ options : >-
29+ --health-cmd pg_isready
30+ --health-interval 10s
31+ --health-timeout 5s
32+ --health-retries 5
33+ ports :
34+ # Maps tcp port 5432 on service container to the host
35+ - 5432:5432
36+
37+ steps :
38+ - uses : actions/checkout@v4
39+ with :
40+ fetch-depth : 0
41+ fetch-tags : true
42+
43+ - name : Setup Go
44+ uses : actions/setup-go@v5
45+ with :
46+ go-version : ' 1.23.x'
47+
48+ - name : Cache Go modules
49+ uses : actions/cache@v4
50+ with :
51+ path : |
52+ ~/go/pkg/mod
53+ ~/.cache/go-build
54+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
55+ restore-keys : |
56+ ${{ runner.os }}-go-
57+
58+ - name : Download dependencies
59+ run : go mod download
60+
61+ - name : Run tests
62+ run : go test -v ./...
63+ working-directory : ./dbos
64+ env :
65+ PGPASSWORD : a!b@c$d()e*_,/:;=?@ff[]22
66+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments