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

sharding test scenarios #146

sharding test scenarios

sharding test scenarios #146

Workflow file for this run

name: CI
on:
push:
tags:
- "v*.*.*"
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-is
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Check formatting
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy -- -Dwarnings
- name: Build
run: cargo build
- name: Integration tests
env:
GOLEM_DOCKER_SERVICES: true
GOLEM_TEST_TEMPLATES: ./test-templates
RUST_LOG: info
CI: true
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')"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-is
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- id: get_version
uses: battila7/get-version-action@v2
- name: Publish crate
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
export VERSION="${{ steps.get_version.outputs.version-without-v }}"
sed -i "s/0.0.0/$VERSION/g" Cargo.toml
cargo publish --all-features --allow-dirty