Skip to content

Secretless build

Secretless build #158

Workflow file for this run

on:
push:
branches: [ 'master' ]
pull_request:
branches: [ '**' ]
name: Rust Build, Test, and Lint
jobs:
build-data:
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
id-token: write
contents: read
environment: build
env:
RUST_BACKTRACE: 1
RUST_LOG: debug
steps:
- name: Azure login
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- uses: mbrobbel/rustfmt-check@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
- name: Cache cargo2junit
id: cache-cargo2junit
uses: actions/cache@v3
with:
path: ~/.cargo/bin/cargo2junit
key: ${{ runner.os }}-cargo2junit
- name: install cargo2junit
if: steps.cache-cargo2junit.outputs.cache-hit != 'true'
run: cargo install cargo2junit
- name: Test
run: cargo test --all-features --no-fail-fast -- -Z unstable-options --format json --report-time | tee results.json && cat results.json | cargo2junit > results.xml
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
KUSTO_CLUSTER_URL: https://sdkse2etest.eastus.kusto.windows.net
KUSTO_DATABASE: fastbatchinge2e
- uses: actions-rs/grcov@v0.1
id: coverage
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
if: always()
with:
files: ${{ steps.coverage.outputs.report }}