Skip to content

chore: use Swatinem/rust-cache@v2 same as trustify #105

chore: use Swatinem/rust-cache@v2 same as trustify

chore: use Swatinem/rust-cache@v2 same as trustify #105

Workflow file for this run

name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install protobuf
run: |
sudo apt-get update
sudo apt-get install protobuf-compiler
- uses: Swatinem/rust-cache@v2
- name: Format
run: cargo fmt --check
- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run guac
run: docker compose -f example/compose/compose-guac.yaml up --detach --wait --wait-timeout 30
- uses: taiki-e/install-action@cargo-llvm-cov
- name: Run tests
run: |
GUAC_URL=http://localhost:8085/query cargo llvm-cov test --fail-under-functions 80 | tee cov.txt
echo "COVERAGE=$(cat cov.txt | grep "TOTAL" | awk '{print $4}' | sed 's/%//g')" >> $GITHUB_ENV