Skip to content

Commit

Permalink
Testing tool commands for run scenarios (#17550)
Browse files Browse the repository at this point in the history
* test pull request for testing testing-tool commands

* test pull request for testing testing-tool commands

* add command for run testing tool in main repo
  • Loading branch information
andriikorotkov authored Oct 7, 2022
1 parent afbf400 commit 0bec940
Showing 1 changed file with 58 additions and 2 deletions.
60 changes: 58 additions & 2 deletions .github/workflows/commands-for-testing-tool.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Run Testing Tool Commands

on:
issue_comment:
types: [created]
Expand Down Expand Up @@ -45,7 +44,8 @@ jobs:
runs-on: ubuntu-latest
if: |
needs.set-params.outputs.command == '/help-full' ||
needs.set-params.outputs.command == '/help'
needs.set-params.outputs.command == '/help' ||
needs.set-params.outputs.command == '/list-scenarios'
needs: set-params
steps:
- name: Update comment for processing
Expand Down Expand Up @@ -77,6 +77,62 @@ jobs:
> :white_check_mark: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
${{ steps.read_file.outputs.contents }}
reactions: +1
- name: Add Failure Comment
if: needs.set-params.outputs.comment-id && failure()
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ needs.set-params.outputs.comment-id }}
body: |
> :x: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
reactions: -1
scenarios-run:
runs-on: ubuntu-latest
if: |
needs.set-params.outputs.command == '/run-scenario' ||
needs.set-params.outputs.command == '/run-scenario-local'
needs: set-params
steps:
- name: Update comment for processing
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ needs.set-params.outputs.comment-id }}
reactions: eyes, rocket
- name: Checkout Airbyte
uses: actions/checkout@v2
with:
repository: ${{ needs.set-params.outputs.repo }}
ref: ${{ needs.set-params.outputs.ref }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Pull Testing Tool docker image
run: docker pull airbyte/airbyte-e2e-testing-tool:latest
- name: Change wrapper permissions
run: |
mkdir secrets
mkdir result
- name: Run Airbyte
run: docker-compose up -d
- name: Connect to secret manager
uses: jsdaniell/create-json@1.1.2
with:
name: "/secrets/service_account_credentials.json"
json: ${{ secrets.GCP_GSM_CREDENTIALS }}
- name: Run docker container with params
run: docker run -v $(pwd)/secrets:/secrets -v $(pwd)/result:/result airbyte/airbyte-e2e-testing-tool:latest ${{ github.event.comment.body }}
- name: Read file with results
id: read_file
uses: andstor/file-reader-action@v1
with:
path: "result/log"
- name: Add Success Comment
if: needs.set-params.outputs.comment-id && success()
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ needs.set-params.outputs.comment-id }}
body: |
> :white_check_mark: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
${{ steps.read_file.outputs.contents }}
reactions: +1
- name: Add Failure Comment
if: needs.set-params.outputs.comment-id && failure()
uses: peter-evans/create-or-update-comment@v1
Expand Down

0 comments on commit 0bec940

Please sign in to comment.