Skip to content

Commit

Permalink
gh: actions, added gocqlx and scylla manager tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kulezi committed Sep 29, 2022
1 parent 2f50568 commit 9a5edc7
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/gocqlx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: GocqlX integration tests
on:
pull_request:
permissions:
contents: read
jobs:
integration:
name: GocqlX integration tests
runs-on: ubuntu-latest
env:
SCYLLA_VERSION: 5.0.0
GOBIN: ./bin
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
repository: scylladb/gocqlx

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1.18.0
stable: true

- name: Replace gocql with scylla-go-driver
run: |
go mod edit -go=1.18
go mod edit -replace github.com/gocql/gocql=github.com/scylladb/scylla-go-driver/gocql@${{github.event.pull_request.head.sha}}
go mod tidy
- name: Make Directory for GOBIN
run: mkdir -p ${GOBIN}

- name: Download Dependencies
run: make get-deps

- name: Run scylla
run: make run-scylla

- name: Run GocqlX tests
run: |
go test -cpu 1 -count=1 -cover -race -tags all .
go test -cpu 1 -count=1 -cover -race -tags all ./qb
go test -cpu 1 -count=1 -cover -race -tags all ./table
go test -cpu 1 -count=1 -cover -race -tags all ./migrate
go test -cpu 1 -count=1 -cover -race -tags all ./dbutil
- name: Stop cluster
run: make stop-scylla
68 changes: 68 additions & 0 deletions .github/workflows/scylla-manager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Scylla Manager integration tests
on:
pull_request:
permissions:
contents: read
jobs:
integration:
name: Scylla Manager integration tests
runs-on: ubuntu-latest
steps:
- name: Check out driver
uses: actions/checkout@v2

- name: Save commit SHA in env
run: echo "DRIVER_VERSION=$(git rev-parse HEAD)" >> $GITHUB_ENV

- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
repository: scylladb/scylla-manager

- name: Set Go version
run: |
echo "GOVERSION=$(cat .go-version)" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v1
id: go
with:
go-version: "${{env.GOVERSION}}"

- name: Set up env variables
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
echo "$(go env -w GOCACHE=/home/runner/work/scylla-manager/scylla-manager/.cache/go-build/)"
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
echo "GOCACHEPATTERN=.cache/go-build/**" >> $GITHUB_ENV
echo "date=$(date +'%m-%Y')" >> $GITHUB_ENV
- name: Install dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: |
./install-dependencies.sh
- name: Replace gocql with scylla-go-driver
run: |
go mod edit -go=1.18
go mod edit -replace github.com/gocql/gocql=github.com/scylladb/scylla-go-driver/gocql@${{github.event.pull_request.head.sha}}
make vendor
- name: Setup test environment
run: |
make start-dev-env
- name: Scylla Manager Integration tests
run: |
# make pkg-integration-test PKG=./pkg/ping/cqlping
make pkg-integration-test PKG=./pkg/ping/dynamoping
make pkg-integration-test PKG=./pkg/scyllaclient
# make pkg-integration-test PKG=./pkg/service/backup
make pkg-integration-test PKG=./pkg/service/cluster
make pkg-integration-test PKG=./pkg/service/healthcheck
# make pkg-integration-test PKG=./pkg/service/repair
make pkg-integration-test PKG=./pkg/service/scheduler
make pkg-integration-test PKG=./pkg/store
make pkg-integration-test PKG=./pkg/schema/migrate
make pkg-integration-test PKG=./pkg/util/netwait

0 comments on commit 9a5edc7

Please sign in to comment.