Skip to content

Commit 4870c2f

Browse files
committed
gh: actions, added gocqlx and scylla manager tests
1 parent 2f50568 commit 4870c2f

File tree

2 files changed

+117
-0
lines changed

2 files changed

+117
-0
lines changed

.github/workflows/gocqlx.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: GocqlX integration tests
2+
on:
3+
pull_request:
4+
permissions:
5+
contents: read
6+
jobs:
7+
integration:
8+
name: GocqlX integration tests
9+
runs-on: ubuntu-latest
10+
env:
11+
SCYLLA_VERSION: 5.0.0
12+
GOBIN: ./bin
13+
steps:
14+
- name: Check out code into the Go module directory
15+
uses: actions/checkout@v2
16+
with:
17+
repository: scylladb/gocqlx
18+
19+
- name: Set up Go
20+
uses: actions/setup-go@v2
21+
with:
22+
go-version: ^1.18.0
23+
stable: true
24+
25+
- name: Replace gocql with scylla-go-driver
26+
run: |
27+
go mod edit -go=1.18
28+
go mod edit -replace github.com/gocql/gocql=github.com/scylladb/scylla-go-driver/gocql@${{github.event.pull_request.head.sha}}
29+
go mod tidy
30+
31+
- name: Make Directory for GOBIN
32+
run: mkdir -p ${GOBIN}
33+
34+
- name: Download Dependencies
35+
run: make get-deps
36+
37+
- name: Run scylla
38+
run: make run-scylla
39+
40+
- name: Run GocqlX tests
41+
run: |
42+
go test -cpu 1 -count=1 -cover -race -tags all .
43+
go test -cpu 1 -count=1 -cover -race -tags all ./qb
44+
go test -cpu 1 -count=1 -cover -race -tags all ./table
45+
go test -cpu 1 -count=1 -cover -race -tags all ./migrate
46+
go test -cpu 1 -count=1 -cover -race -tags all ./dbutil
47+
48+
- name: Stop cluster
49+
run: make stop-scylla

.github/workflows/scylla-manager.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Scylla Manager integration tests
2+
on:
3+
pull_request:
4+
permissions:
5+
contents: read
6+
jobs:
7+
integration:
8+
name: Scylla Manager integration tests
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check out driver
12+
uses: actions/checkout@v2
13+
14+
- name: Save commit SHA in env
15+
run: echo "DRIVER_VERSION=$(git rev-parse HEAD)" >> $GITHUB_ENV
16+
17+
- name: Check out code into the Go module directory
18+
uses: actions/checkout@v2
19+
with:
20+
repository: scylladb/scylla-manager
21+
22+
- name: Set Go version
23+
run: |
24+
echo "GOVERSION=$(cat .go-version)" >> $GITHUB_ENV
25+
26+
- name: Set up Go
27+
uses: actions/setup-go@v1
28+
id: go
29+
with:
30+
go-version: "${{env.GOVERSION}}"
31+
32+
- name: Set up env variables
33+
run: |
34+
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
35+
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
36+
echo "$(go env -w GOCACHE=/home/runner/work/scylla-manager/scylla-manager/.cache/go-build/)"
37+
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
38+
echo "GOCACHEPATTERN=.cache/go-build/**" >> $GITHUB_ENV
39+
echo "date=$(date +'%m-%Y')" >> $GITHUB_ENV
40+
41+
- name: Install dependencies
42+
if: steps.cache-dependencies.outputs.cache-hit != 'true'
43+
run: |
44+
./install-dependencies.sh
45+
46+
- name: Replace gocql with scylla-go-driver
47+
run: |
48+
go mod edit -go=1.18
49+
go mod edit -replace github.com/gocql/gocql=github.com/scylladb/scylla-go-driver/gocql@${{github.event.pull_request.head.sha}}
50+
make vendor
51+
52+
- name: Setup test environment
53+
run: |
54+
make start-dev-env
55+
56+
- name: Scylla Manager Integration tests
57+
run: |
58+
make pkg-integration-test PKG=./pkg/ping/cqlping
59+
make pkg-integration-test PKG=./pkg/ping/dynamoping
60+
make pkg-integration-test PKG=./pkg/scyllaclient
61+
make pkg-integration-test PKG=./pkg/service/backup
62+
make pkg-integration-test PKG=./pkg/service/cluster
63+
make pkg-integration-test PKG=./pkg/service/healthcheck
64+
make pkg-integration-test PKG=./pkg/service/repair
65+
make pkg-integration-test PKG=./pkg/service/scheduler
66+
make pkg-integration-test PKG=./pkg/store
67+
make pkg-integration-test PKG=./pkg/schema/migrate
68+
make pkg-integration-test PKG=./pkg/util/netwait

0 commit comments

Comments
 (0)