Skip to content

chore: auto-update pre-commit hooks #1002

chore: auto-update pre-commit hooks

chore: auto-update pre-commit hooks #1002

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-uv
with:
PYTHON_VERSION: ${{ matrix.version }}
- uses: ./.github/actions/install-canvas
# Run Pytest unit tests via uv.
- 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: uv run pytest -m "not integtest" --ff --verbosity 2
# Run Pytest integration tests via uv.
- 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: uv 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: |
uv build
pipx install dist/*.whl
canvas --version
rm -rf dist/
shell: bash