Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
CI and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
senia-psm committed Mar 13, 2024
1 parent e38258d commit 2b175e2
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,21 @@ jobs:
run: cargo clippy -- -Dwarnings
- name: Build
run: cargo build
- name: Tests
- name: Integration tests
env:
GOLEM_DOCKER_SERVICES: true
GOLEM_TEST_TEMPLATES: ./test-templates
RUST_LOG: info
CI: true
run: cargo test
run: cargo test --test integration
- name: Sharding tests
env:
GOLEM_DOCKER_SERVICES: true
GOLEM_TEST_TEMPLATES: ./test-templates
RUST_LOG: info
CI: true
run: cargo test --test sharding
timeout-minutes: 10
publish:
needs: [build]
if: "startsWith(github.ref, 'refs/tags/v')"
Expand Down
11 changes: 9 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,20 @@ You can run all tests with

To run individual tests you should first build all executables with `./scripts/build-all.sh` and then run tests by name:
```shell
GOLEM_DOCKER_SERVICES=true GOLEM_TEST_TEMPLATES="./test-templates" cargo test worker_new_instance
GOLEM_DOCKER_SERVICES=true GOLEM_TEST_TEMPLATES="./test-templates" cargo test --test integration worker_new_instance
```

With `QUIET=true` you can hide services output:
```shell
QUIET=true GOLEM_DOCKER_SERVICES=true GOLEM_TEST_TEMPLATES="./test-templates" cargo test
QUIET=true GOLEM_DOCKER_SERVICES=true GOLEM_TEST_TEMPLATES="./test-templates" cargo test --test integration
```

This way tests will use configured versions of golem docker images.
To run tests against the latest binaries without docker - see [`golem-services` CONTRIBUTING.md](https://github.com/golemcloud/golem-services/blob/main/CONTRIBUTING.md)

## Running sharding tests

Same as integration tests, but with `--test sharding` instead of `--test integration`:
```shell
QUIET=true GOLEM_DOCKER_SERVICES=true GOLEM_TEST_TEMPLATES="./test-templates" cargo test --test sharding
```
2 changes: 1 addition & 1 deletion scripts/it.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ script_full_path=$(dirname "$0")
cd "${script_full_path}"/.. || exit

./scripts/build-all.sh
GOLEM_DOCKER_SERVICES=true GOLEM_TEST_TEMPLATES="./test-templates" RUST_LOG=info cargo test
GOLEM_DOCKER_SERVICES=true GOLEM_TEST_TEMPLATES="./test-templates" RUST_LOG=info cargo test --test integration
Binary file added test-templates/option-service.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use std::path::PathBuf;
use testcontainers::clients;

const NETWORK: &str = "golem_test_network";
const TAG: &str = "v0.0.63";
const TAG: &str = "v0.0.67";

#[derive(Debug, Clone)]
pub struct EnvConfig {
Expand Down

0 comments on commit 2b175e2

Please sign in to comment.