feat(ActiveSDK): Import prediction #1986
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SDK PR report | |
on: | |
pull_request: | |
branches: | |
- master | |
env: | |
PYTHON: 3.8 | |
POETRY: 1.8.3 | |
UNIT_TEST_REPORT_PYTHON_3_8_P1: unit-test-report-python-3_8_p1.xml | |
UNIT_TEST_REPORT_PYTHON_3_8_P2: unit-test-report-python-3_8_p2.xml | |
BACKEND_ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
BACKEND_REPO: cord-team/cord-backend | |
INTEGRATION_TEST_REPORT_PYTHON_3_11: integration-test-report-python3_11.xml | |
INTEGRATION_TESTS_PRIVATE_KEY: ${{ secrets.SDK_TESTS_PRIVATE_KEY }} | |
INTEGRATION_TESTS_PRIVATE_KEY_SERVICE_ACCOUNT: ${{ secrets.SDK_TESTS_PRIVATE_KEY_SERVICE_ACCOUNT }} | |
INTEGRATION_TESTS_PRIVATE_KEY_NON_ORG: ${{ secrets.SDK_TESTS_PRIVATE_KEY_NON_ORG }} | |
concurrency: | |
group: cord-client-${{ github.ref }}-pr | |
cancel-in-progress: true | |
jobs: | |
formatting: | |
name: Linting and type checking | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup root poetry environment | |
uses: ./.github/actions/setup-root-poetry-environment | |
with: | |
cache-key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Run linting, type checking and testing | |
uses: pre-commit/[email protected] | |
with: | |
extra_args: "--all-files --hook-stage=push" | |
unit-tests-python-3-8: | |
name: Run unit tests (Python 3.8, Pydantic 1.x) | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Run unit tests for Python 3.8 (Pydantic 1.x) | |
uses: ./.github/actions/run-unit-tests | |
with: | |
python-version: 3.8.16 | |
pydantic-version: 1.10.14 | |
test-report-file: ${{ env.UNIT_TEST_REPORT_PYTHON_3_8_P1 }} | |
- name: Publish unit test report Python 3.8 (Pydantic 1.x) | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
with: | |
files: ${{ env.UNIT_TEST_REPORT_PYTHON_3_8_P1 }} | |
check_name: Unit test report (Pydantic 1.x) | |
unit-tests-python-3-8-pydantic-2: | |
name: Run unit tests (Python 3.8, Pydantic 2.x) | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Run unit tests for Python 3.8 (Pydantic 2.x) | |
uses: ./.github/actions/run-unit-tests | |
with: | |
python-version: 3.8.16 | |
pydantic-version: 2.6.1 | |
test-report-file: ${{ env.UNIT_TEST_REPORT_PYTHON_3_8_P2 }} | |
- name: Publish unit test report Python 3.8 (Pydantic 2.x) | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
with: | |
files: ${{ env.UNIT_TEST_REPORT_PYTHON_3_8_P2 }} | |
check_name: Unit test report ((Pydantic 2.x) | |
integration-tests-python-3-11: | |
name: Run integration tests for Python 3.11 | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Checkout backend repo | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ env.BACKEND_REPO }} | |
token: ${{ env.BACKEND_ACCESS_TOKEN }} | |
path: encord-backend | |
- name: Run integration tests for Python 3.11 | |
uses: ./.github/actions/run-integration-tests | |
with: | |
python-version: 3.11.2 | |
integration-tests-location: ./encord-backend/projects/sdk-integration-tests | |
test-report-file: ${{ env.INTEGRATION_TEST_REPORT_PYTHON_3_11 }} | |
private-key: ${{ env.INTEGRATION_TESTS_PRIVATE_KEY }} | |
private-key-service-account: ${{ env.INTEGRATION_TESTS_PRIVATE_KEY_SERVICE_ACCOUNT }} | |
private-key-non-org: ${{ env.INTEGRATION_TESTS_PRIVATE_KEY_NON_ORG }} | |
sdk-repository-url: https://github.com/encord-team/encord-client-python@${{ github.sha }} | |
- name: Publish integration test report Python 3.11 | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
with: | |
files: ./encord-backend/projects/sdk-integration-tests/${{ env.INTEGRATION_TEST_REPORT_PYTHON_3_11 }} | |
check_name: SDK integration test report |