Initial tuktuk buildout #4
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: tuktuk-sdk | |
on: | |
push: | |
branches: [main] | |
tags: ['tuktuk-sdk-v*'] | |
paths: ['tuktuk-sdk/**', '.github/workflows/tuktuk-sdk.yml'] | |
pull_request: | |
branches: [main] | |
paths: ['tuktuk-sdk/**', '.github/workflows/tuktuk-sdk.yml'] | |
jobs: | |
hygiene: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup | Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.12.1 | |
with: | |
access_token: ${{ github.token }} | |
- name: Setup | Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy, rustfmt | |
- name: Setup | Tools | |
run: sudo apt-get install -y protobuf-compiler | |
- name: Build | Hygiene | |
run: | | |
cargo fmt --package tuktuk-sdk -- --check | |
cargo clippy --package tuktuk-sdk --all-features -- -D clippy::all | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup | Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup | Tarpaulin | |
uses: jaxxstorm/action-install-gh-release@v1.12.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
repo: xd009642/tarpaulin | |
- name: Setup | Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Setup | Tools | |
run: sudo apt-get install -y protobuf-compiler | |
- name: Test | Run | |
env: | |
RUST_BACKTRACE: 1 | |
run: | | |
cargo tarpaulin --packages tuktuk-sdk --no-dead-code --engine llvm --out xml -- --test-threads 1 |