-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add CI workflow for unit, integration and e2e tests #117
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
base: main
Are you sure you want to change the base?
Conversation
cc9883c to
8810c05
Compare
Signed-off-by: Maciek Malik <[email protected]>
8810c05 to
9ddbf9d
Compare
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ main, "feat/75-tests-ci" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| branches: [ main, "feat/75-tests-ci" ] | |
| branches: | |
| - main | |
| - feat/75-tests-ci |
Prefer to list out the matrix values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And will probably need to remove the feat/75-tests-ci branch before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes that branch shouldn't be here, it was here just for testing
| uses: ./.github/workflows/run-unit-tests.yml | ||
|
|
||
| integration-tests: | ||
| needs: [ unit-tests ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer to list out the matrix values.
| PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | ||
|
|
||
| e2e-tests: | ||
| needs: [ integration-tests ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer to list out the matrix values.
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
| ACCOUNT_ID: ${{ secrets.ACCOUNT_ID }} | ||
| PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | ||
| E2E_LLM_PROVIDER: ${{ vars.E2E_LLM_PROVIDER }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| E2E_LLM_PROVIDER: ${{ vars.E2E_LLM_PROVIDER }} | |
| E2E_LLM_PROVIDER: ${{ inputs.e2e-llm-provider }} |
this needs to be passed in as an input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, I'll adjust that.
It was done in the same way as we have currently in the agent kit JS repo. Do you think it's worth changing it over there too to keep it consistent? @rbarker-dev
| description: Working directory | ||
| required: false | ||
| default: 'python' | ||
| type: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| type: string | |
| type: string | |
| e2e-llm-provider: | |
| description: LLM provider for e2e tests | |
| required: true/false | |
| default: <SOME_VALUE> # please fill this in | |
| type: string |
|
|
||
| e2e-tests: | ||
| needs: [ integration-tests ] | ||
| uses: ./.github/workflows/run-e2e-tests.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| uses: ./.github/workflows/run-e2e-tests.yml | |
| uses: ./.github/workflows/run-e2e-tests.yml | |
| with: | |
| e2e-llm-provider: <SOME_VALUE> |
| workdir: | ||
| description: Working directory | ||
| required: false | ||
| default: 'python' | ||
| type: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| workdir: | |
| description: Working directory | |
| required: false | |
| default: 'python' | |
| type: string | |
| workdir: | |
| description: Working directory | |
| required: false | |
| default: 'python' | |
| type: string | |
| e2e-llm-provider: | |
| description: LLM Provider for E2E Integration Tests | |
| required: true/false | |
| default: <SOME_VALUE> | |
| type: string |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
| ACCOUNT_ID: ${{ secrets.ACCOUNT_ID }} | ||
| PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | ||
| E2E_LLM_PROVIDER: ${{ vars.E2E_LLM_PROVIDER }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| E2E_LLM_PROVIDER: ${{ vars.E2E_LLM_PROVIDER }} | |
| E2E_LLM_PROVIDER: ${{ inputs.e2e-llm-provider }} |
| - name: Run integration tests (throttled) | ||
| working-directory: ${{ inputs.workdir }} | ||
| env: | ||
| TEST_DELAY_MS: '8000' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| TEST_DELAY_MS: '8000' | |
| TEST_DELAY_MS: '8000' # <Add a comment for why 8000ms sleep is required> |
|
|
||
| integration-tests: | ||
| needs: [ unit-tests ] | ||
| uses: ./.github/workflows/run-integration-tests.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| uses: ./.github/workflows/run-integration-tests.yml | |
| uses: ./.github/workflows/run-integration-tests.yml | |
| with: | |
| e2e-llm-provider: <SOME_VALUE> |
| needs: [ unit-tests ] | ||
| uses: ./.github/workflows/run-integration-tests.yml | ||
| secrets: | ||
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| LLM_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
| needs: [ integration-tests ] | ||
| uses: ./.github/workflows/run-e2e-tests.yml | ||
| secrets: | ||
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| LLM_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
| default: 'python' | ||
| type: string | ||
| secrets: | ||
| OPENAI_API_KEY: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| OPENAI_API_KEY: | |
| LLM_API_KEY: |
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ main, "feat/75-tests-ci" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And will probably need to remove the feat/75-tests-ci branch before merging.
| runs-on: hedera-agent-linux-medium | ||
| env: | ||
| WORKDIR: python | ||
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| LLM_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
| default: 'python' | ||
| type: string | ||
| secrets: | ||
| OPENAI_API_KEY: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| OPENAI_API_KEY: | |
| LLM_API_KEY: |
| runs-on: hedera-agent-linux-medium | ||
| env: | ||
| WORKDIR: python | ||
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| LLM_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
Description:
Related issue(s):
#75
Fixes #
Notes for reviewer:
Checklist