Skip to content

Commit

Permalink
Added a Github Action That Tests Functionality for PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
IamLRBA committed Dec 18, 2024
1 parent f949438 commit 4ba4022
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: PR Test Workflow

on:
pull_request:
branches:
- main

jobs:
test-pr:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup Hedera Solo
uses: ./
id: solo

- name: Use Hedera Solo
run: |
echo "Account ID: ${{ steps.solo.outputs.accountId }}"
echo "Private Key: ${{ steps.solo.outputs.privateKey }}"
echo "Public Key: ${{ steps.solo.outputs.publicKey }}"
RESPONSE=$(curl -s -w "%{http_code}" -X 'GET' 'http://localhost:8080/api/v1/network/nodes' -H 'accept: application/json' -o response.json)
if [ "$RESPONSE" -ne 200 ]; then
echo "Error: API request failed with status code $RESPONSE"
cat response.json
exit 1
else
echo "API request successful"
cat response.json
fi

0 comments on commit 4ba4022

Please sign in to comment.