Nemesis Tests #14492
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: Nemesis Tests | |
on: | |
schedule: | |
- cron: '* */4 * * *' | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
PROTOC_VERSION: 3.23.4 | |
# FIXME: There are some warnings depending on certain feature flags that | |
# we need to fix before we can enable this. | |
# RUSTFLAGS: "-D warnings" | |
jobs: | |
test-nemesis: | |
runs-on: ubuntu-latest | |
if: github.repository == 'tursodatabase/libsql' | |
name: Run Nemesis Tests | |
env: | |
RUSTFLAGS: -D warnings --cfg tokio_unstable | |
steps: | |
- uses: hecrj/setup-rust-action@v2 | |
# needed because we run out of disk space during tests | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/free-disk-space@main | |
with: | |
# this might remove tools that are actually needed, | |
# when set to "true" but frees about 6 GB | |
tool-cache: true | |
- name: Install deps | |
run: sudo apt update && sudo apt install -y libclang-dev | |
- name: Install protoc | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: protoc@${{ env.PROTOC_VERSION }} | |
- uses: actions/checkout@v3 | |
- name: Set up cargo cache | |
uses: actions/cache@v3 | |
continue-on-error: false | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-cargo- | |
- name: Cargo build | |
run: | | |
cargo build | |
mv ./target/debug/sqld ~/.cargo/bin | |
sqld --version | |
- name: Download MinIO binary | |
run: | | |
wget -q https://dl.min.io/server/minio/release/linux-amd64/minio -O minio | |
chmod +x minio | |
mv minio ~/.cargo/bin | |
minio --version | |
- name: Nemesis tests checkout | |
uses: actions/checkout@v3 | |
with: | |
repository: tursodatabase/tursotest | |
ref: "main" | |
path: "nemesis-tests" | |
token: ${{ secrets.ACCESS_TOKEN_TURSO_TEST }} | |
- name: Build nemesis test | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: nemesis-tests/go.mod | |
- run: | | |
cd nemesis-tests | |
go build -o ../tursotests cmd/tursotest/main.go | |
- name: Run nemesis tests | |
run: | | |
./tursotests nemesis local |