Skip to content

Add matrix testing for VSS authorizer variants #2733

Add matrix testing for VSS authorizer variants

Add matrix testing for VSS authorizer variants #2733

Workflow file for this run

name: CI Checks - VSS Integration Tests
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
authorizer: [noop, sig, jwt]
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
with:
path: ldk-node
- name: Checkout VSS
uses: actions/checkout@v3
with:
repository: lightningdevkit/vss-server
path: vss-server
- name: Build and Deploy VSS Server
run: |
cd vss-server/rust
if [ "${{ matrix.authorizer }}" == "noop" ]; then
RUSTFLAGS="--cfg noop_authorizer" cargo run --release --no-default-features server/vss-server-config.toml &
elif [ "${{ matrix.authorizer }}" == "jwt" ]; then
# Public key for testing purposes solely.
export VSS_JWT_RSA_PEM=$(cat ../../ldk-node/tests/fixtures/vss_jwt_rsa_pub.pem)
cargo run --release server/vss-server-config.toml &
elif [ "${{ matrix.authorizer }}" == "sig" ]; then
cargo run --release server/vss-server-config.toml &
else
echo "Unknown authorizer: ${{ matrix.authorizer }}" && exit 1
fi
- name: Run VSS Integration tests for ${{ matrix.authorizer }}
run: |
cd ldk-node
export TEST_VSS_BASE_URL="http://localhost:8080/vss"
RUSTFLAGS="--cfg vss_test --cfg ${{ matrix.authorizer }}_auth_test" cargo test --features test_utils io::vss_store
RUSTFLAGS="--cfg vss_test --cfg cycle_tests --cfg ${{ matrix.authorizer }}_auth_test" cargo test \
--features test_utils --test integration_tests_vss