update: add current_schema.json & nest AND in db_schema.rs #18
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: Test and Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
FORCE_COLOR: 1 | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: full | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup 3-node Scylla cluster | |
run: | | |
sudo sh -c "echo 2097152 >> /proc/sys/fs/aio-max-nr" | |
docker compose -f test/docker-compose.yml up -d --wait | |
- name: Create Keyspace | |
run: | | |
docker exec scylla1 cqlsh -e \ | |
"CREATE KEYSPACE charybdis WITH replication = {'class': 'NetworkTopologyStrategy', 'replication_factor': 2};" | |
- name: Cache Dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Update rust toolchain | |
run: rustup update | |
- name: Print rustc version | |
run: rustc --version | |
- name: Print rustfmt version | |
run: cargo fmt --version | |
- name: Print clippy version | |
run: cargo clippy --version | |
- name: Format check | |
run: cargo fmt --verbose -- --check | |
- name: Clippy check | |
run: cargo clippy --verbose | |
- name: Cargo check | |
run: cargo check --verbose | |
- name: Build | |
run: cargo build --verbose | |
- name: Install Charybdis Migration Tool | |
run: cargo install --path charybdis-migrate --force | |
- name: Run Charybdis Migration Tool | |
run: migrate --keyspace charybdis --host 127.0.0.1:9042 --drop-and-replace | |
- name: Run tests | |
run: cargo test --verbose |