2022-03-05 14:50:18 +00:00
|
|
|
name: Continuous integration
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
2023-03-30 20:14:06 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
|
2022-03-05 14:50:18 +00:00
|
|
|
jobs:
|
|
|
|
|
2023-04-17 13:27:32 +00:00
|
|
|
format:
|
|
|
|
name: Check format
|
2023-03-31 18:58:27 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2022-03-05 14:50:18 +00:00
|
|
|
steps:
|
2023-04-17 13:27:32 +00:00
|
|
|
|
|
|
|
- name: Install stable toolchain
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
with:
|
|
|
|
components: rustfmt
|
|
|
|
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Run cargo fmt
|
|
|
|
run: cargo fmt --all -- --check
|
|
|
|
|
|
|
|
check:
|
|
|
|
name: Check workspace
|
|
|
|
runs-on: ubuntu-20.04-16-cores
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Install stable toolchain
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
|
2022-03-05 14:50:18 +00:00
|
|
|
- name: Checkout sources
|
2022-12-26 14:14:05 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-07-13 09:28:08 +00:00
|
|
|
|
2023-03-31 19:12:10 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get -y update
|
|
|
|
sudo apt-get -y install protobuf-compiler libprotobuf-dev
|
|
|
|
|
2023-04-17 13:27:32 +00:00
|
|
|
- name: Run cargo check
|
|
|
|
run: cargo check --locked --workspace
|
|
|
|
|
|
|
|
check-wasm:
|
|
|
|
name: Check Wasm
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
|
2022-03-05 14:50:18 +00:00
|
|
|
- name: Install stable toolchain
|
2022-12-26 14:14:05 +00:00
|
|
|
uses: dtolnay/rust-toolchain@stable
|
2023-04-17 13:27:32 +00:00
|
|
|
with:
|
|
|
|
targets: wasm32-unknown-unknown
|
|
|
|
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Run cargo check
|
|
|
|
run: cargo check --locked --package surrealdb --features protocol-ws,protocol-http,kv-mem,kv-indxdb --target wasm32-unknown-unknown
|
|
|
|
|
|
|
|
clippy:
|
|
|
|
name: Check clippy
|
|
|
|
runs-on: ubuntu-20.04-16-cores
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Install stable toolchain
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
with:
|
|
|
|
components: clippy
|
|
|
|
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get -y update
|
|
|
|
sudo apt-get -y install protobuf-compiler libprotobuf-dev
|
|
|
|
|
|
|
|
- name: Run cargo clippy
|
|
|
|
run: cargo clippy --no-deps -- -W warnings
|
|
|
|
|
|
|
|
test:
|
|
|
|
name: Test workspace
|
|
|
|
runs-on: ubuntu-20.04-16-cores
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Install stable toolchain
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get -y update
|
|
|
|
sudo apt-get -y install protobuf-compiler libprotobuf-dev
|
|
|
|
|
|
|
|
- name: Run cargo test
|
2023-05-04 23:05:51 +00:00
|
|
|
run: cargo test --locked --no-default-features --features storage-mem,scripting,http --workspace -- --skip api_integration
|
2023-04-17 13:27:32 +00:00
|
|
|
|
|
|
|
ws-engine:
|
|
|
|
name: WebSocket engine
|
|
|
|
runs-on: ubuntu-20.04-16-cores
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Install stable toolchain
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get -y update
|
|
|
|
sudo apt-get -y install protobuf-compiler libprotobuf-dev
|
2022-07-13 09:28:08 +00:00
|
|
|
|
2022-03-05 14:50:18 +00:00
|
|
|
- name: Run cargo test
|
2022-12-30 08:23:19 +00:00
|
|
|
run: |
|
2023-04-11 19:23:45 +00:00
|
|
|
cargo build --locked --no-default-features --features storage-mem
|
|
|
|
(&>/dev/null ./target/debug/surreal start --log trace --user root --pass root memory &)
|
2023-04-17 13:27:32 +00:00
|
|
|
cargo test --locked --package surrealdb --no-default-features --features protocol-ws --test api api_integration::ws
|
2022-03-05 14:50:18 +00:00
|
|
|
|
2023-04-17 13:27:32 +00:00
|
|
|
http-engine:
|
|
|
|
name: HTTP engine
|
|
|
|
runs-on: ubuntu-20.04-16-cores
|
2022-03-05 14:50:18 +00:00
|
|
|
steps:
|
2022-07-13 09:28:08 +00:00
|
|
|
|
2023-04-17 13:27:32 +00:00
|
|
|
- name: Install stable toolchain
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
|
2022-03-05 14:50:18 +00:00
|
|
|
- name: Checkout sources
|
2022-12-26 14:14:05 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-07-13 09:28:08 +00:00
|
|
|
|
2023-03-31 19:12:10 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get -y update
|
|
|
|
sudo apt-get -y install protobuf-compiler libprotobuf-dev
|
|
|
|
|
2023-04-17 13:27:32 +00:00
|
|
|
- name: Run cargo test
|
|
|
|
run: |
|
|
|
|
cargo build --locked --no-default-features --features storage-mem
|
|
|
|
(&>/dev/null ./target/debug/surreal start --log trace --user root --pass root memory &)
|
|
|
|
cargo test --locked --package surrealdb --no-default-features --features protocol-http --test api api_integration::http
|
|
|
|
|
|
|
|
mem-engine:
|
|
|
|
name: Memory engine
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
|
2022-03-05 14:50:18 +00:00
|
|
|
- name: Install stable toolchain
|
2022-12-26 14:14:05 +00:00
|
|
|
uses: dtolnay/rust-toolchain@stable
|
2022-07-13 09:28:08 +00:00
|
|
|
|
2023-04-17 13:27:32 +00:00
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v3
|
2022-07-13 09:28:08 +00:00
|
|
|
|
2023-04-17 13:27:32 +00:00
|
|
|
- name: Run cargo test
|
|
|
|
run: cargo test --locked --package surrealdb --no-default-features --features kv-mem --test api api_integration::mem
|
2022-07-13 09:28:08 +00:00
|
|
|
|
2023-04-17 13:27:32 +00:00
|
|
|
file-engine:
|
|
|
|
name: File engine
|
|
|
|
runs-on: ubuntu-20.04-16-cores
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Install stable toolchain
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Run cargo test
|
|
|
|
run: cargo test --locked --package surrealdb --no-default-features --features kv-rocksdb --test api api_integration::file
|
|
|
|
|
|
|
|
any-engine:
|
|
|
|
name: Any engine
|
|
|
|
runs-on: ubuntu-20.04-16-cores
|
|
|
|
steps:
|
2022-12-30 08:23:19 +00:00
|
|
|
|
2023-04-17 13:27:32 +00:00
|
|
|
- name: Install stable toolchain
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get -y update
|
|
|
|
sudo apt-get -y install protobuf-compiler libprotobuf-dev
|
|
|
|
|
|
|
|
- name: Run cargo test
|
|
|
|
run: |
|
|
|
|
cargo build --locked --no-default-features --features storage-mem
|
|
|
|
(&>/dev/null ./target/debug/surreal start --log trace --user root --pass root memory &)
|
|
|
|
cargo test --locked --package surrealdb --no-default-features --features protocol-http --test api api_integration::any
|