Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a Github Action That Tests Functionality for PRs #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading