From 0ae3752a7efbddee7154321f0205eecd25d0aa78 Mon Sep 17 00:00:00 2001 From: Joshua Fernandes Date: Tue, 12 Sep 2023 12:38:15 +1000 Subject: [PATCH] extract api --- .github/workflows/openapi.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/openapi.yml b/.github/workflows/openapi.yml index b51656776a0..aeda61dcb20 100644 --- a/.github/workflows/openapi.yml +++ b/.github/workflows/openapi.yml @@ -30,3 +30,21 @@ jobs: - name: Assemble run: ./gradlew --no-daemon --parallel clean compileJava compileTestJava compileJmhJava compileIntegrationTestJava compileAcceptanceTestJava compilePropertyTestJava assemble + + - name: Extract API + run: | + ./gradlew --no-daemon --parallel installDist + + mkdir -p .openapidoc/spec + build/install/teku/bin/teku --network=mainnet --ee-endpoint=unsafe-test-stub --Xinterop-enabled=true --rest-api-enabled=true --rest-api-docs-enabled=true 2>&1 > teku_output.log & + TEKU_PID=$! + + EXIT_CODE=0 + wget --timeout=30 --retry-connrefused --output-document=.openapidoc/spec/teku.json http://localhost:5051/swagger-docs + if [ $? != 0 ]; then + EXIT_CODE=1 + fi + + kill $TEKU_PID + exit $EXIT_CODE +