feat: plugins custom API handlers #982
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: Build and Test | |
on: | |
pull_request: | |
branches: ["main"] | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: [ 3.11, 3.12 ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/install-python-and-poetry | |
with: | |
PYTHON_VERSION: ${{ matrix.version }} | |
- uses: ./.github/actions/install-canvas | |
# Run Pytest unit tests via Poetry. | |
- name: Run Pytest unit tests | |
env: | |
CUSTOMER_IDENTIFIER: "ci-unit-tests" | |
INTEGRATION_TEST_URL: "https://api-test-clinic.canvasmedical.com" | |
INTEGRATION_TEST_CLIENT_ID: ${{ secrets.INTEGRATION_TEST_CLIENT_ID }} | |
INTEGRATION_TEST_CLIENT_SECRET: ${{ secrets.INTEGRATION_TEST_CLIENT_SECRET }} | |
run: poetry run pytest -m "not integtest" --ff --verbosity 2 | |
# Run Pytest integration tests via Poetry. | |
- name: Run Pytest integration tests | |
if: matrix.version == '3.12' | |
env: | |
CUSTOMER_IDENTIFIER: "ci-integration-tests" | |
INTEGRATION_TEST_URL: "https://api-test-clinic.canvasmedical.com" | |
INTEGRATION_TEST_CLIENT_ID: ${{ secrets.INTEGRATION_TEST_CLIENT_ID }} | |
INTEGRATION_TEST_CLIENT_SECRET: ${{ secrets.INTEGRATION_TEST_CLIENT_SECRET }} | |
run: poetry run pytest -m "integtest" --ff --verbosity 2 | |
- name: Install pipx | |
run: pip install pipx | |
shell: bash | |
- name: Test the distribution | |
env: | |
CUSTOMER_IDENTIFIER: "ci-distribution" | |
run: | | |
poetry build | |
pipx install dist/*.whl | |
canvas --version | |
rm -rf dist/ | |
shell: bash |