-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (39 loc) · 1011 Bytes
/
test.yml
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
on: push
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.21.x, 1.22.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
services:
ceph:
image: bancek/ceph-rgw-swift-test:0.1.0-nautilus
ports:
- "8080:8080"
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get dependencies
run: go get ./...
- name: Wait for Ceph
run: |
while ! curl --fail -H "X-Auth-User: test:test" -H "X-Auth-Key: test" http://localhost:8080/auth/v1.0 2> /dev/null; do
echo "waiting for swift"
sleep 1
done
echo
- name: Test
run: |
go test -v ./...