diff --git a/.github/workflows/action-test.yml b/.github/workflows/action-test.yml new file mode 100644 index 000000000..b82f8e767 --- /dev/null +++ b/.github/workflows/action-test.yml @@ -0,0 +1,44 @@ +name: Action test + +on: + push: + branches: [main, release/**] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref_protected == 'true' && github.sha || github.ref }} + cancel-in-progress: true + +jobs: + basic-test: + name: Basic tests + strategy: + fail-fast: false + matrix: + sys: + # x64 + - os: ubuntu-latest-16-cores + # ARM + - os: ubuntu-jammy-16-cores-arm64 + # Intel + - os: macos-13 + tag: [latest, testing] + runs-on: ${{ matrix.sys.os }} + steps: + - uses: stellar/quickstart@main + with: + tag: ${{ matrix.tag }} + - name: "Run basic test making sure RPC and Horizon are available" + run: > + RESP=`curl --no-progress-meter -X POST -H 'Content-Type: application/json' -d + '{"jsonrpc": "2.0", "id": 8675309, "method": "getLatestLedger"}' http://localhost:8000/rpc` + + echo "RPC getLatestLedger response: $RESP" + + echo "$RESP" | grep sequence + + RESP=`curl -i -o - --silent 'http://localhost:8000/ledgers?limit=1' + -H 'Accept: application/json'` + + echo "Horizon ledgers response: $RESP" + + echo "$RESP" | grep "200 OK"