-
Notifications
You must be signed in to change notification settings - Fork 9
77 lines (64 loc) · 1.87 KB
/
unit-tests.yaml
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
77
name: unit tests
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop, releases/** ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# TODO: add macos-latest
os: [ubuntu-22.04]
python-version: [3.7, 3.8]
exclude:
- os: macos-latest
python-version: [3.5, 3.6]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up Node
uses: actions/setup-node@v4
with:
# Obtain the latest cached version of npm (either local cache or action cache)
node-version: node
- name: Install Python3 dependencies
run: |
python -m pip install --upgrade pip pytest
pip uninstall pip
pip install pip==23.3.1
pip install -r requirements.txt
python setup.py install
python setup.py build_ext --inplace
python -m pip list
- name: Pin pandas version
if: ${{ matrix.python-version == 3.7 }}
run: |
pip install pandas==1.2.5
python -m pip list | grep pandas
- name: Update Black
if: ${{ matrix.python-version == 3.7 }}
run: |
pip install flake8-pytest-importorskip
pip install --upgrade click==8.0.4
pip install black==21.12b0
pip install flake8==4.0.1
- name: Lint and Format Check with Flake8 and Black
if: ${{ matrix.python-version == 3.7 }}
run: |
black --diff --check .
flake8
- name: Check License Headers
run: |
python license.py verify
- name: Install ExtraP
if: ${{ matrix.python-version >= 3.7 }}
run: |
pip install extrap
- name: Basic Test with pytest
run: |
PYTHONPATH=. $(which pytest)