Skip to content

ci: fixed triggers

ci: fixed triggers #12

Workflow file for this run

name: "[Rust SDK] Code Check"
on:
pull_request:
branches: [ master ]
paths:
- 'rust/**'
- 'proto/**'
- '.github/workflows/**'
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
PROTOC_VERSION: "26.1"
jobs:
tests:
name: "[Rust SDK] Format, Lint, Test"
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: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt
- uses: taiki-e/install-action@nextest
- name: Check formatting
run: cargo fmt --all -- --check
- name: SDK tests
run: cargo nextest run --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 }}
run: cargo nextest run --all
working-directory: rust/examples
clippy:
name: "[Rust SDK] Run Clippy"
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@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
# - 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