forked from airbytehq/airbyte
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (54 loc) · 1.96 KB
/
Copy pathtest-command.yml
File metadata and controls
55 lines (54 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Run Integration Test
on:
workflow_dispatch:
inputs:
# e.g. source-github
connector:
description: "Airbyte Connector"
required: true
repo:
description: "Repo to check out code from. Defaults to the main airbyte repo. Set this when building connectors from forked repos."
required: false
default: "airbytehq/airbyte"
gitref:
description: "The git ref to check out from the specified repository."
required: false
default: master
comment-id:
description: "The comment-id of the slash command. Used to update the comment with the status."
required: false
uuid:
description: "Custom UUID of workflow run. Used because GitHub dispatches endpoint does not return workflow run id."
required: false
jobs:
integration-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.gitref }}
- name: Mock connection test
id: test
run: |
echo "Mock connection test (sleep for 2 seconds)..."
sleep 2
echo "Integration test for connector ${{ github.event.inputs.connector }} has completed"
- name: Mark workflow as completed
run: |
export CONNECTOR=${{ github.event.inputs.connector }}
export CONNECTOR_TYPE=$(echo ${CONNECTOR} | cut -d"-" -f1)
cat > connector_report.json <<-EOF
{
"${CONNECTOR_TYPE}s": {
"${CONNECTOR}": {
"test_running": false,
"test_run_status": "${{ steps.test.outcome == 'failure' && '❌' || '✅' }}",
"test_run_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
}
}
EOF
- name: Run Stoat action
uses: stoat-dev/stoat-action@liren/airbyte-connector-plugin
if: always()