Skip to content

Add workflow to Github actions to run tests on Cassandra #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
- [ ] I have split my patch into logically separate commits.
- [ ] All commit messages clearly explain what they change and why.
- [ ] PR description sums up the changes and reasons why they should be introduced.
- [ ] I have enabled appropriate tests in `.github/workflows/build.yaml` in `gtest_filter`.
- [ ] I have enabled appropriate tests in `.github/workflows/build.yml` in `gtest_filter`.
- [ ] I have enabled appropriate tests in `.github/workflows/cassandra.yml` in `gtest_filter`.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jobs:
:*5.Integration_Cassandra_*\
:*19.Integration_Cassandra_*\
:CassandraTypes/CassandraTypesTests/*.Integration_Cassandra_UDT"
run: valgrind --error-exitcode=123 ./cassandra-integration-tests --version=release:5.0.0 --category=CASSANDRA --verbose=ccm --gtest_filter="$Tests"
run: valgrind --error-exitcode=123 ./cassandra-integration-tests --scylla --version=release:5.0.0 --category=CASSANDRA --verbose=ccm --gtest_filter="$Tests"
52 changes: 52 additions & 0 deletions .github/workflows/cassandra.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Cassandra

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'

- name: Setup Python 3
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Setup environment
run: |
sudo sh -c "echo 'deb http://security.ubuntu.com/ubuntu xenial-security main' >> /etc/apt/sources.list"
sudo apt-get update
sudo apt-get install libssl1.0.0 libuv1-dev libkrb5-dev libc6-dbg
sudo snap install valgrind --classic
pip3 install https://github.com/scylladb/scylla-ccm/archive/master.zip
sudo sh -c "echo 2097152 >> /proc/sys/fs/aio-max-nr"

- name: Build
run: cmake -DCASS_BUILD_INTEGRATION_TESTS=ON . && make

- name: Run integration tests on Cassandra 3.0.8
env:
# Ignored tests are added in the end, after the "-" sign.
Tests: "ClusterTests.*\
:BasicsTests.*\
:PreparedTests.*\
:CassandraTypes/CassandraTypesTests/*.Integration_Cassandra_*\
:-PreparedTests.Integration_Cassandra_PreparedIDUnchangedDuringReprepare\
:*5.Integration_Cassandra_*\
:*19.Integration_Cassandra_*\
:CassandraTypes/CassandraTypesTests/*.Integration_Cassandra_UDT"
run: valgrind --error-exitcode=123 ./cassandra-integration-tests --version=3.0.8 --category=CASSANDRA --verbose=ccm --gtest_filter="$Tests"
2 changes: 1 addition & 1 deletion tests/src/integration/ccm/bridge.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ typedef struct _LIBSSH2_CHANNEL LIBSSH2_CHANNEL;
#define DEFAULT_REMOTE_DEPLOYMENT_USERNAME "vagrant"
#define DEFAULT_REMOTE_DEPLOYMENT_PASSWORD "vagrant"
#define DEFAULT_IS_VERBOSE false
#define DEFAULT_IS_SCYLLA true
#define DEFAULT_IS_SCYLLA false
#define DEFAULT_SMP 1
#define DEFAULT_JVM_ARGUMENTS std::vector<std::string>()

Expand Down
2 changes: 1 addition & 1 deletion tests/src/integration/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ std::string Options::private_key_ = "private.key";
bool Options::is_verbose_ccm_ = false;
bool Options::is_verbose_integration_ = false;
bool Options::is_beta_protocol_ = true;
bool Options::is_scylla_ = true;
bool Options::is_scylla_ = false;
int Options::smp_ = 1;

// Static initialization is not guaranteed for the following types
Expand Down