feat: Add sorted set put and fetch functions #380
Workflow file for this run
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: CI | |
on: | |
pull_request: | |
branches: [main] | |
env: | |
CARGO_TERM_COLOR: always | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TEST_CACHE_NAME: rust-integration-test-ci-${{ github.sha }} | |
jobs: | |
rustfmt: | |
name: Style & Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install protoc | |
run: ./scripts/install_protoc_linux.sh | |
- name: Commitlint and Other Shared Build Steps | |
uses: momentohq/standards-and-practices/github-actions/shared-build@gh-actions-v1 | |
- uses: Swatinem/rust-cache@v2 | |
- name: rustfmt | |
run: cargo fmt -- --check | |
- name: Rigorous lint via Clippy | |
run: cargo clippy --all-targets --all-features -- -D warnings -W clippy::unwrap_used | |
build_rust: | |
runs-on: macos-latest | |
env: | |
MOMENTO_API_KEY: ${{ secrets.ALPHA_TEST_AUTH_TOKEN }} | |
TEST_API_KEY: ${{ secrets.ALPHA_TEST_AUTH_TOKEN }} | |
# TODO: get rid of this once everything has been migrated to MOMENTO_API_KEY | |
TEST_AUTH_TOKEN: ${{ secrets.ALPHA_TEST_AUTH_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install protoc | |
run: ./scripts/install_protoc_osx.sh | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build | |
run: cargo build --verbose | |
- name: Cargo Check | |
run: cargo check | |
- name: Test Setup | |
run: cargo run --example test-setup | |
- name: Unit Tests | |
run: cargo test --lib | |
- name: Doc Tests | |
run: cargo test --doc | |
- name: Integration Tests | |
run: cargo test --tests | |
- name: Test Teardown | |
if: always() | |
run: cargo run --example test-teardown | |
rustfmt-build-examples: | |
name: Style & Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install protoc | |
run: ./scripts/install_protoc_linux.sh | |
- name: Commitlint and Other Shared Build Steps | |
uses: momentohq/standards-and-practices/github-actions/shared-build@gh-actions-v1 | |
- uses: Swatinem/rust-cache@v2 | |
- name: rustfmt -> rigorous lint via Clippy -> build | |
id: validation | |
continue-on-error: true | |
run: | | |
pushd example | |
cargo fmt -- --check | |
cargo clippy --all-targets --all-features -- -D warnings -W clippy::unwrap_used | |
cargo build --verbose | |
popd | |
- name: Send CI failure mail | |
if: ${{ steps.validation.outcome == 'failure' }} | |
uses: ./.github/actions/error-email-action | |
with: | |
username: ${{secrets.MOMENTO_ROBOT_GMAIL_USERNAME}} | |
password: ${{secrets.MOMENTO_ROBOT_GMAIL_PASSWORD}} | |
- name: Flag Job Failure | |
if: ${{ steps.validation.outcome == 'failure' }} | |
run: exit 1 |