-
Notifications
You must be signed in to change notification settings - Fork 16
57 lines (52 loc) · 1.7 KB
/
test_devices_plugin.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Lint and Test Devices Plugin
on:
push:
branches: ["main"]
paths:
- plugins/devices/src/turnkeyml_plugin_devices/common/**
- plugins/devices/setup.py
- .github/workflows/test_devices_plugin.yml
pull_request:
branches: ["main"]
paths:
- plugins/devices/src/turnkeyml_plugin_devices/common/**
- plugins/devices/setup.py
- .github/workflows/test_devices_plugin.yml
permissions:
contents: read
jobs:
build-devices-plugin:
env:
TURNKEY_TRACEBACK: True
strategy:
matrix:
python-version: ["3.8", "3.11"]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Miniconda with 64-bit Python
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
activate-environment: tkml
python-version: ${{ matrix.python-version }}
- name: Install dependencies
shell: bash -el {0}
run: |
python -m pip install --upgrade pip
conda install pylint
pip install pytest
pip install -e plugins/devices
pip install transformers timm
python -m pip check
- name: Lint with PyLint
shell: bash -el {0}
run: |
pylint plugins/devices/src --rcfile .pylintrc --disable E0401,E0203
- name: Test with unittest
shell: bash -el {0}
run: |
python plugins/devices/test/benchmark.py