-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (47 loc) · 1.66 KB
/
build-and-test.yml
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
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