-
Notifications
You must be signed in to change notification settings - Fork 44
48 lines (45 loc) · 1.18 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: tests
on:
pull_request:
env:
COUCHDB_USER: admin
COUCHDB_PASSWORD: abc123
jobs:
test:
strategy:
matrix:
go-version: [1.22] # TODO: Add 1.23rc2
name: test
runs-on: ubuntu-latest
services:
couchdb:
env:
COUCHDB_USER: admin
COUCHDB_PASSWORD: abc123
image: couchdb:2.2.0
options: >
--health-cmd "curl -sSf http://localhost:5984/_up"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5984:5984
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
check-latest: true
go-version: ${{ matrix.go-version }}
- name: Prepare CouchDB
run: |
export KIVIK_TEST_DSN_COUCH22=http://${COUCHDB_USER}:${COUCHDB_PASSWORD}@couchdb:5984/
while ! curl -sSf http://couchdb:5984/; do
echo "Waiting for CouchDB to be ready..."
sleep 5
done
./script/complete_couch2.sh ${KIVIK_TEST_DSN_COUCH22}
- name: Run tests
run: |
go mod download
go test -race -shuffle=on ./...