This repository has been archived by the owner on Nov 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 121
67 lines (54 loc) · 1.64 KB
/
pre-release-CI.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
54
55
56
57
58
59
60
61
62
63
64
65
name: Build and Test installation
on:
workflow_dispatch:
workflow_call:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test-installation:
name: Test on ${{ matrix.os }}-py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.9, '3.10', 3.11]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.3.2
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Download wheels
uses: actions/download-artifact@v2
with:
name: wheels
path: ./dist/
- name: Install dev dependencies
run: |
poetry install --no-root --only dev --no-interaction
- name: Install the wheel
run: |
source $VENV
ls -lah ./dist
pip install ./dist/canopy_sdk*.whl
- name: Run unit tests
run: |
source $VENV
pytest --html=report.html --self-contained-html tests/unit
- name: Upload pytest reports
if: failure()
uses: actions/upload-artifact@v3
with:
name: pytest-report-${{ matrix.os }}-py${{ matrix.python-version }}
path: .pytest_cache