Add Org level API key #234
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: "[Rust SDK] Code Check" | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [ master ] | |
paths: | |
- 'rust/**' | |
- 'proto/**' | |
- '.github/workflows/**' | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: full | |
PROTOC_VERSION: "26.1" | |
jobs: | |
examples_linux: | |
name: "[Rust SDK - Linux] Run examples" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: rust | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: arduino/setup-protoc@v3 | |
with: | |
version: ${{env.PROTOC_VERSION}} | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: taiki-e/install-action@nextest | |
- name: SDK tests | |
run: cargo nextest run --no-tests=warn --all | |
- name: Run Examples | |
env: | |
TEAM_ID: ${{ secrets.TEAM_ID }} | |
AWS_TEST_ROLE: ${{ secrets.AWS_TEST_ROLE }} | |
CORALOGIX_TEAM_API_KEY: ${{ secrets.CORALOGIX_TEAM_API_KEY }} | |
CORALOGIX_USER_API_KEY: ${{ secrets.CORALOGIX_USER_API_KEY }} | |
CORALOGIX_REGION: ${{ secrets.CORALOGIX_REGION }} | |
AWS_REGION: ${{ secrets.AWS_REGION }} | |
METRICS_BUCKET: ${{ secrets.METRICS_BUCKET }} | |
LOGS_BUCKET: ${{ secrets.LOGS_BUCKET }} | |
run: cargo nextest run --no-tests=warn --all | |
working-directory: rust/examples | |
examples_windows: | |
name: "[Rust SDK - Windows] Run examples" | |
runs-on: windows-latest | |
defaults: | |
run: | |
working-directory: rust | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: arduino/setup-protoc@v3 | |
with: | |
version: ${{env.PROTOC_VERSION}} | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: taiki-e/install-action@nextest | |
- name: Run Examples | |
env: | |
TEAM_ID: ${{ secrets.TEAM_ID }} | |
AWS_TEST_ROLE: ${{ secrets.AWS_TEST_ROLE }} | |
CORALOGIX_TEAM_API_KEY: ${{ secrets.CORALOGIX_TEAM_API_KEY }} | |
CORALOGIX_USER_API_KEY: ${{ secrets.CORALOGIX_USER_API_KEY }} | |
CORALOGIX_REGION: ${{ secrets.CORALOGIX_REGION }} | |
AWS_REGION: ${{ secrets.AWS_REGION }} | |
METRICS_BUCKET: ${{ secrets.METRICS_BUCKET }} | |
LOGS_BUCKET: ${{ secrets.LOGS_BUCKET }} | |
run: cargo nextest run --no-tests=warn --all | |
working-directory: rust/examples | |
clippy: | |
name: "[Rust SDK] Run Clippy, Formatting check & SDK tests" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: rust | |
# permissions: | |
# security-events: write # to upload sarif results | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: arduino/setup-protoc@v3 | |
with: | |
version: ${{env.PROTOC_VERSION}} | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: clippy, rustfmt | |
- uses: taiki-e/install-action@nextest | |
- uses: Swatinem/rust-cache@v2 | |
- name: Check formatting | |
run: cargo +nightly fmt --all -- --check | |
# - name: Install SARIF tools | |
# run: cargo install clippy-sarif --locked | |
# - name: Install SARIF tools | |
# run: cargo install sarif-fmt --locked | |
# - name: Check | |
# run: > | |
# cargo clippy --workspace --all-features --all-targets --message-format=json -- -D warnings --allow deprecated | |
# | clippy-sarif | |
# | tee clippy-results.sarif | |
# | sarif-fmt | |
# continue-on-error: true | |
# - name: Upload | |
# uses: github/codeql-action/upload-sarif@v3 | |
# with: | |
# sarif_file: clippy-results.sarif | |
# wait-for-processing: true | |
- name: Run Clippy | |
run: cargo clippy --workspace --all-features --all-targets -- -D warnings --allow deprecated | |
- name: SDK tests | |
run: cargo nextest run --no-tests=warn --all |