-
Notifications
You must be signed in to change notification settings - Fork 7
66 lines (64 loc) · 2.23 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
on:
push:
branches: [ 'master' ]
pull_request:
branches: [ '**' ]
name: Rust Build, Test, and Lint
permissions:
checks: write
pull-requests: write
id-token: write
contents: read
jobs:
build-data:
runs-on: ubuntu-latest
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
- run: cargo fmt --all -- --check
- 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 }}