Files
SpacetimeDB/.github/workflows/ci.yml
T
NoaandGitHub 540c519002 Rewrite smoketests as python unittests (#692)
* Rewrite smoketests as python unittests

* Get all tests working and do some work on parallel unittest

* Give up on parallel unittests

* Fix CI + address comments

* Fix skip-clippy arg confusion (just use the env var)

* fix ci

* Add comments
2024-03-14 02:47:38 +00:00

81 lines
2.1 KiB
YAML

on:
pull_request:
push:
branches:
- master
merge_group:
name: CI
jobs:
docker_smoketests:
name: Smoketests
runs-on: spacetimedb-runner
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: dsherret/rust-toolchain-file@v1
- name: Start containers
run: docker compose up -d
- name: Run smoketests
run: python -m smoketests --docker -x zz_docker
# These cannot run in parallel, even though the script tries to handle it
# TODO: Fix flaky tests https://github.com/clockworklabs/SpacetimeDB/issues/630
# - name: Run restarting smoketests
# run: python -m smoketests --docker zz_docker
- name: Stop containers
if: always()
run: docker compose down
test:
name: Test Suite
runs-on: spacetimedb-runner
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: dsherret/rust-toolchain-file@v1
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.x"
- name: Create /stdb dir
run: |
sudo mkdir /stdb
sudo chmod 777 /stdb
- name: Run cargo test
run: cargo test --all --features odb_rocksdb,odb_sled,metrics
lints:
name: Lints
runs-on: spacetimedb-runner
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: dsherret/rust-toolchain-file@v1
- run: echo ::add-matcher::.github/workflows/rust_matcher.json
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Run cargo clippy
run: cargo clippy --all --tests --benches --features odb_rocksdb,odb_sled,metrics -- -D warnings
wasm_bindings:
name: Build and test wasm bindings
runs-on: spacetimedb-runner
steps:
- uses: actions/checkout@v3
- uses: dsherret/rust-toolchain-file@v1
- run: echo ::add-matcher::.github/workflows/rust_matcher.json
- name: Build rust-wasm-test
run: cargo run -p spacetimedb-cli -- build modules/rust-wasm-test
- name: Run bindgen tests
run: cargo test -p spacetimedb-cli