#100 allow other password authenticator to work ZDM-530 (#101) #317
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ZDM Tests | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
# Runs a NoSQLBench job in docker-compose with 3 proxy nodes | |
# Verifies the written data matches in both ORIGIN and TARGET clusters | |
nosqlbench-tests: | |
name: NoSQLBench Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Start docker-compose | |
id: compose | |
run: | | |
docker-compose -f docker-compose-tests.yml up --abort-on-container-exit --exit-code-from=nosqlbench | |
- name: Test Summary | |
if: ${{ failure() }} | |
run: | | |
docker container ls --all | grep zdm_tests_nb | awk '{print $1}' | xargs -I {} docker container cp {}:/logs reports | |
cat reports/*.summary >> $GITHUB_STEP_SUMMARY | |
# Runs all the unit tests under the proxy module (all the *_test.go files) | |
unit-tests: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run | |
run: | | |
sudo apt update | |
sudo apt -y install default-jre gcc git wget | |
wget https://go.dev/dl/go1.19.linux-amd64.tar.gz | |
sudo tar -xzf go*.tar.gz -C /usr/local/ | |
export PATH=$PATH:/usr/local/go/bin | |
export PATH=$PATH:`go env GOPATH`/bin | |
go install github.com/jstemmer/go-junit-report/v2@latest | |
go test -v 2>&1 ./proxy/... | go-junit-report -set-exit-code -iocopy -out report-unit.xml | |
- name: Test Summary | |
uses: test-summary/action@v1 | |
if: always() | |
with: | |
paths: | | |
report-unit.xml | |
# Runs mock tests defined under integration-tests | |
# These tests use Simulacron and in-memory CQLServer | |
integration-tests-mock: | |
name: Mock Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run | |
run: | | |
sudo apt update | |
sudo apt -y install openjdk-8-jdk gcc git wget | |
wget https://go.dev/dl/go1.19.linux-amd64.tar.gz | |
sudo tar -xzf go*.tar.gz -C /usr/local/ | |
export PATH=$PATH:/usr/local/go/bin | |
export PATH=$PATH:`go env GOPATH`/bin | |
go install github.com/jstemmer/go-junit-report/v2@latest | |
wget https://github.com/datastax/simulacron/releases/download/0.10.0/simulacron-standalone-0.10.0.jar | |
export SIMULACRON_PATH=`pwd`/simulacron-standalone-0.10.0.jar | |
go test -timeout 180m -v 2>&1 ./integration-tests | go-junit-report -set-exit-code -iocopy -out report-integration-mock.xml | |
- name: Test Summary | |
uses: test-summary/action@v1 | |
if: always() | |
with: | |
paths: | | |
report-integration-mock.xml | |
# Runs integration tests using CCM | |
integration-tests-ccm: | |
name: CCM Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run | |
run: | | |
sudo apt update | |
sudo apt -y install openjdk-8-jdk gcc git wget pip | |
wget https://go.dev/dl/go1.19.linux-amd64.tar.gz | |
sudo tar -xzf go*.tar.gz -C /usr/local/ | |
export PATH=$PATH:/usr/local/go/bin | |
export PATH=$PATH:`go env GOPATH`/bin | |
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 | |
export PATH=$JAVA_HOME/bin:$PATH | |
java -version | |
go install github.com/jstemmer/go-junit-report/v2@latest | |
pip install ccm | |
which ccm | |
sudo ln -s /home/runner/.local/bin/ccm /usr/local/bin/ccm | |
/usr/local/bin/ccm list | |
go test -timeout 180m -v 2>&1 ./integration-tests -RUN_MOCKTESTS=false -RUN_CCMTESTS=true | go-junit-report -set-exit-code -iocopy -out report-integration-ccm.xml | |
- name: Test Summary | |
uses: test-summary/action@v1 | |
if: always() | |
with: | |
paths: | | |
report-integration-ccm.xml | |
# Runs the mock tests with go's race checker to spot potential data races | |
race-checker: | |
name: Race Checker | |
runs-on: ubuntu-latest | |
if: ${{ false }} # temporarily disabled | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run | |
run: | | |
sudo apt update | |
sudo apt -y install openjdk-8-jdk gcc git pip wget | |
wget https://go.dev/dl/go1.19.linux-amd64.tar.gz | |
sudo tar -xzf go*.tar.gz -C /usr/local/ | |
export PATH=$PATH:/usr/local/go/bin | |
export PATH=$PATH:`go env GOPATH`/bin | |
go install github.com/jstemmer/go-junit-report/v2@latest | |
wget https://github.com/datastax/simulacron/releases/download/0.10.0/simulacron-standalone-0.10.0.jar | |
export SIMULACRON_PATH=`pwd`/simulacron-standalone-0.10.0.jar | |
go test -race -timeout 180m -v 2>&1 ./integration-tests | go-junit-report -set-exit-code -iocopy -out report-integration-race.xml | |
- name: Test Summary | |
uses: test-summary/action@v1 | |
if: always() | |
with: | |
paths: | | |
report-integration-race.xml | |
# Performs static analysis to check for things like context leaks | |
go-vet: | |
name: Go Vet | |
runs-on: ubuntu-latest | |
if: ${{ false }} # temporarily disabled | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run | |
run: | | |
sudo apt update | |
sudo apt -y install openjdk-8-jdk gcc git pip wget | |
wget https://go.dev/dl/go1.19.linux-amd64.tar.gz | |
sudo tar -xzf go*.tar.gz -C /usr/local/ | |
export PATH=$PATH:/usr/local/go/bin | |
export PATH=$PATH:`go env GOPATH`/bin | |
go vet ./... |