feat: add CI workflow for unit, integration and e2e tests#117
feat: add CI workflow for unit, integration and e2e tests#117
Conversation
cc9883c to
8810c05
Compare
Signed-off-by: Maciek Malik <maciej.malik@blockydevs.com>
8810c05 to
9ddbf9d
Compare
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ main, "feat/75-tests-ci" ] |
There was a problem hiding this comment.
| 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.
And will probably need to remove the feat/75-tests-ci branch before merging.
There was a problem hiding this comment.
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.
Prefer to list out the matrix values.
| PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | ||
|
|
||
| e2e-tests: | ||
| needs: [ integration-tests ] |
There was a problem hiding this comment.
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.
| 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.
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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| OPENAI_API_KEY: | |
| LLM_API_KEY: |
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ main, "feat/75-tests-ci" ] |
There was a problem hiding this comment.
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.
| 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.
| 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.
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| LLM_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
Description:
Related issue(s):
#75
Fixes #
Notes for reviewer:
Checklist