feat: bound incoming request and add postgres service #169
Workflow file for this run
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: Ping Check | |
| on: [push, pull_request] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| ping-check: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [ ubuntu-latest ] | |
| toolchain: [ stable, 1.85.0 ] # 1.85.0 is the MSRV | |
| runs-on: ${{ matrix.platform }} | |
| services: | |
| postgres: | |
| image: postgres:latest | |
| ports: | |
| - 5432:5432 | |
| env: | |
| POSTGRES_DB: postgres | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Check formatting | |
| run: rustup component add rustfmt && cd rust && cargo fmt --all -- --check | |
| - name: Build and Deploy VSS Server | |
| run: | | |
| cd rust | |
| RUSTFLAGS="--cfg noop_authorizer" cargo build --no-default-features | |
| ./target/debug/vss-server server/vss-server-config.toml& | |
| - name: Hit endpoint to verify service is up | |
| run: | | |
| sleep 5 | |
| # Put request with store='storeId' and key=k1 | |
| hex=0A0773746F726549641A150A026B3110FFFFFFFFFFFFFFFFFF011A046B317631 | |
| curl -f --data-binary "$(echo "$hex" | xxd -r -p)" http://localhost:8080/vss/putObjects | |
| # Get request with store='storeId' and key=k1 | |
| hex=0A0773746F7265496412026B31 | |
| curl -f --data-binary "$(echo "$hex" | xxd -r -p)" http://localhost:8080/vss/getObject |