fix: align HTTP+JSON REST interop #16
This file contains hidden or 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: CI | |
| on: | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: "-D warnings" | |
| jobs: | |
| build-test: | |
| name: Build and test (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable | |
| with: | |
| components: clippy, rustfmt | |
| - name: Install protoc | |
| uses: arduino/setup-protoc@v3 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Restore Rust cache | |
| uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Check compilation | |
| run: cargo check --workspace | |
| - name: Check formatting | |
| if: runner.os == 'Linux' | |
| run: cargo fmt --all -- --check | |
| - name: Clippy lints | |
| run: cargo clippy --workspace --all-targets -- -D warnings | |
| - name: Run tests | |
| run: cargo test --workspace | |
| - name: Check copyright headers | |
| if: matrix.os != 'windows-latest' | |
| shell: bash | |
| run: | | |
| missing=0 | |
| for f in $(find . -name '*.rs' -not -path '*/gen/*' -not -path '*/target/*'); do | |
| if ! head -1 "$f" | grep -q '^// Copyright AGNTCY'; then | |
| echo "Missing header: $f" | |
| missing=$((missing + 1)) | |
| fi | |
| done | |
| if [ "$missing" -gt 0 ]; then | |
| echo "ERROR: $missing file(s) missing copyright header" | |
| exit 1 | |
| fi |