-
Notifications
You must be signed in to change notification settings - Fork 17
76 lines (73 loc) · 2.51 KB
/
tests.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
66
67
68
69
70
71
72
73
74
75
76
name: Tests
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
python: 3.7
torch: 1.13.1+cpu
torchvision: 0.14.1+cpu
torch-source: https://download.pytorch.org/whl/torch_stable.html
- os: ubuntu-latest
python: 3.8
torch: 1.13.1+cpu
torchvision: 0.14.1+cpu
torch-source: https://download.pytorch.org/whl/torch_stable.html
- os: ubuntu-latest
python: 3.9
torch: 1.13.1+cpu
torchvision: 0.14.1+cpu
torch-source: https://download.pytorch.org/whl/torch_stable.html
- os: ubuntu-latest
python: "3.10"
torch: 1.13.1+cpu
torchvision: 0.14.1+cpu
torch-source: https://download.pytorch.org/whl/torch_stable.html
- os: macos-latest
python: 3.8
torch: 1.13.1
torchvision: 0.14.1
torch-source: https://download.pytorch.org/whl/torch_stable.html
- os: windows-latest
python: 3.8
torch: 1.13.1+cpu
torchvision: 0.14.1+cpu
torch-source: https://download.pytorch.org/whl/torch_stable.html
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Python version
run: |
python --version
- name: Install Python
run: |
python -m pip install --upgrade pip setuptools
python -m pip install torch==${{ matrix.torch }} torchvision==${{ matrix.torchvision }} -f ${{ matrix.torch-source }}
python -m pip install -e ".[test]"
- name: Install for MacOSX
if: matrix.os == 'macos-latest'
run: brew install libomp # required for onnxruntime
- run: npm ci # install from package-lock.json without modifying it
- run: npm run build
- name: Print environment
run: |
python -m pip freeze
python --version
python -c "import openpifpaf; print(openpifpaf.__version__)"
python -c "import openpifpafwebdemo; print(openpifpafwebdemo.__version__)"
- name: Lint Python
run: |
pylint openpifpafwebdemo --disable=fixme
- name: pycodestyle openpifpafwebdemo
run: |
python -m pycodestyle openpifpafwebdemo
- run: npm run lint
- run: npm run test