-
Notifications
You must be signed in to change notification settings - Fork 7
59 lines (57 loc) · 2.13 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
on: [push]
name: Rust Build, Test, and Lint
jobs:
build-data:
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
environment: sdke2e
env:
RUST_BACKTRACE: 1
RUST_LOG: debug
KUSTO_CLUSTER_URL: https://sdkse2etest.eastus.kusto.windows.net
KUSTO_DATABASE: fastbatchinge2e
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
steps:
- 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'
- 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 }}