Skip to content

Merge pull request #545 from in-toto/actions-regenerate-attestation-l… #25

Merge pull request #545 from in-toto/actions-regenerate-attestation-l…

Merge pull request #545 from in-toto/actions-regenerate-attestation-l… #25

name: Run Rust tests
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'rust/**'
# Want to trigger these tests whenever the attestation
# libraries are regenerated, or new modules/tests are
# added to the language bindings
pull_request:
paths:
- 'rust/**'
permissions: read-all
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install protoc dependency
uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
version: '24.x'
- name: Build
run: |
cd rust && cargo build
- name: Format
run: |
cd rust && cargo fmt --check
- name: Lint
run: |
cd rust && cargo clippy -- -Dwarnings
- name: Run tests
run: |
cd rust && cargo test