-
Notifications
You must be signed in to change notification settings - Fork 33
58 lines (55 loc) · 1.51 KB
/
python-package.yml
File metadata and controls
58 lines (55 loc) · 1.51 KB
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
# Python Package
#
# Automatically build and test the package for supported Python 3.x versions.
#
name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python: ['3.7', '3.8', '3.9', '3.10']
include:
- os: windows-latest
python: '3.7'
- os: macOS-latest
python: '3.7'
- os: windows-latest
python: '3.10'
- os: macOS-latest
python: '3.10'
name: Python ${{ matrix.python }} ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Conda
uses: s-weigand/setup-conda@v1
with:
activate-conda: true
update-conda: true
python-version: ${{ matrix.python }}
conda-channels: pytorch
- name: Install Requirements
run: |
conda install pytorch torchvision cpuonly -c pytorch
pip install poetry invoke pillow --force
- name: Setup Dependencies
run: |
poetry config virtualenvs.create false
poetry install
- name: Run Automated Tests
run: |
poetry run pytest -c tasks/pytest.ini -v -k "not test_api"
- name: Run API Test Suite
run: |
poetry run pytest -c tasks/pytest.ini -v -k test_api --suite=fast
- name: Create Package
run: |
poetry build