Skip to content

Update websocket domain (#458) #432

Update websocket domain (#458)

Update websocket domain (#458) #432

Workflow file for this run

name: Test SDK
on:
push:
branches:
- master
workflow_dispatch:
env:
UNIT_TEST_REPORT_PYTHON_3_8: unit-test-report-python3_8.xml
UNIT_TEST_REPORT_PYTHON_3_9: unit-test-report-python3_9.xml
UNIT_TEST_REPORT_PYTHON_3_10: unit-test-report-python3_10.xml
UNIT_TEST_REPORT_PYTHON_3_11: unit-test-report-python3_11.xml
INTEGRATION_TEST_REPORT_PYTHON_3_11: integration-test-report-python3_11.xml
INTEGRATION_TESTS_PRIVATE_KEY: ${{ secrets.SDK_TESTS_PRIVATE_KEY }}
BACKEND_ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BACKEND_REPO: cord-team/cord-backend
concurrency:
group: cord-client-${{ github.ref }}-test
cancel-in-progress: true
jobs:
unit-tests-python-3-8:
name: Run unit tests for Python 3.8
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Run unit tests for Python 3.8
uses: ./.github/actions/run-unit-tests
with:
python-version: 3.8.16
test-report-file: ${{ env.UNIT_TEST_REPORT_PYTHON_3_8 }}
unit-tests-python-3-9:
name: Run unit tests for Python 3.9
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Run unit tests for Python 3.9
uses: ./.github/actions/run-unit-tests
with:
python-version: 3.9.10
test-report-file: ${{ env.UNIT_TEST_REPORT_PYTHON_3_9 }}
unit-tests-python-3-10:
name: Run unit tests for Python 3.10
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Run unit tests for Python 3.10
uses: ./.github/actions/run-unit-tests
with:
python-version: 3.10.2
test-report-file: ${{ env.UNIT_TEST_REPORT_PYTHON_3_10 }}
unit-tests-python-3-11:
name: Run unit tests for Python 3.11
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Run unit tests for Python 3.11
uses: ./.github/actions/run-unit-tests
with:
python-version: 3.11.2
test-report-file: ${{ env.UNIT_TEST_REPORT_PYTHON_3_11 }}
integration-tests-python-3-11:
name: Run integration tests for Python 3.11
runs-on: ubuntu-20.04
steps:
- name: Checkout backend repo
uses: actions/checkout@v3
with:
repository: ${{ env.BACKEND_REPO }}
token: ${{ env.BACKEND_ACCESS_TOKEN }}
- name: Run integration tests for Python 3.11
uses: ./.github/actions/run-sdk-integration-tests
with:
python-version: 3.11.2
test-report-file: ${{ env.INTEGRATION_TEST_REPORT_PYTHON_3_11 }}
private-key: ${{ env.INTEGRATION_TESTS_PRIVATE_KEY }}
sdk-repository-url: https://github.com/encord-team/encord-client-python@${{ github.sha }}
publish-test-reports:
name: Publish test reports
runs-on: ubuntu-20.04
needs: [
unit-tests-python-3-8,
unit-tests-python-3-9,
unit-tests-python-3-10,
unit-tests-python-3-11,
integration-tests-python-3-11,
]
if: success() || failure()
steps:
- name: Download unit test report Python 3.8
uses: actions/download-artifact@v2
with:
name: ${{ env.UNIT_TEST_REPORT_PYTHON_3_8 }}
path: ${{ env.UNIT_TEST_REPORT_PYTHON_3_8 }}
- name: Download unit test report Python 3.9
uses: actions/download-artifact@v2
with:
name: ${{ env.UNIT_TEST_REPORT_PYTHON_3_9 }}
path: ${{ env.UNIT_TEST_REPORT_PYTHON_3_9 }}
- name: Download unit test report Python 3.10
uses: actions/download-artifact@v2
with:
name: ${{ env.UNIT_TEST_REPORT_PYTHON_3_10 }}
path: ${{ env.UNIT_TEST_REPORT_PYTHON_3_10 }}
- name: Download unit test report Python 3.11
uses: actions/download-artifact@v2
with:
name: ${{ env.UNIT_TEST_REPORT_PYTHON_3_11 }}
path: ${{ env.UNIT_TEST_REPORT_PYTHON_3_11 }}
- name: Download integration test report Python 3.11
uses: actions/download-artifact@v2
with:
name: ${{ env.INTEGRATION_TEST_REPORT_PYTHON_3_11 }}
path: ${{ env.INTEGRATION_TEST_REPORT_PYTHON_3_11 }}
- name: Publish unit test report Python 3.8
uses: EnricoMi/publish-unit-test-result-action@v1
with:
files: ${{ env.UNIT_TEST_REPORT_PYTHON_3_8 }}/*.xml
check_name: Unit test report
- name: Publish unit test report Python 3.9
uses: EnricoMi/publish-unit-test-result-action@v1
with:
files: ${{ env.UNIT_TEST_REPORT_PYTHON_3_9 }}/*.xml
check_name: Unit test report
- name: Publish unit test report Python 3.10
uses: EnricoMi/publish-unit-test-result-action@v1
with:
files: ${{ env.UNIT_TEST_REPORT_PYTHON_3_10 }}/*.xml
check_name: Unit test report
- name: Publish unit test report Python 3.11
uses: EnricoMi/publish-unit-test-result-action@v1
with:
files: ${{ env.UNIT_TEST_REPORT_PYTHON_3_11 }}/*.xml
check_name: Unit test report
- name: Publish integration test report Python 3.11
uses: EnricoMi/publish-unit-test-result-action@v1
with:
files: ${{ env.INTEGRATION_TEST_REPORT_PYTHON_3_11 }}/*.xml
check_name: SDK integration test report
send-slack-notification:
name: Send notification
runs-on: ubuntu-20.04
needs: [ publish-test-reports ]
if: always()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get workflow status
uses: technote-space/workflow-conclusion-action@v2
- name: Send Slack notification
uses: ./.github/actions/send-slack-notification
with:
success-parameter: ${{ env.WORKFLOW_CONCLUSION }}
failure-channel: ${{ secrets.SLACK_FAILURE_CHANNEL_ID }}
failure-message: This pipeline has failed!