Skip to content

Commit

Permalink
feat: add CI actions for OpenAPI and Rust
Browse files Browse the repository at this point in the history
Partially address #3

Signed-off-by: Thomas Fossati <thomas.fossati@linaro.org>
  • Loading branch information
thomas-fossati committed Jul 4, 2024
1 parent e848d5d commit 320a054
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/openapi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: OpenAPI

on:
push:
paths:
- 'doc/api/**'
pull_request:
paths:
- 'doc/api/**'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Install OpenAPI spec validator
run: pip install openapi-spec-validator
- name: Check key-broker API
run: openapi-spec-validator doc/api/keys/keys.yaml
29 changes: 29 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Rust

on:
push:
paths:
- 'rust-keybroker/**'
pull_request:
paths:
- 'rust-keybroker/**'

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Formatting checks
run: cargo fmt --manifest-path=rust-keybroker/Cargo.toml --all -- --check
- name: Clippy checks
run: cargo clippy --manifest-path=rust-keybroker/Cargo.toml --all-targets -- -D clippy::all -D clippy::cargo -A clippy::multiple-crate-versions
- name: Build
run: cargo build --manifest-path=rust-keybroker/Cargo.toml --verbose
- name: Run tests
run: cargo test --manifest-path=rust-keybroker/Cargo.toml --verbose

0 comments on commit 320a054

Please sign in to comment.