-
Notifications
You must be signed in to change notification settings - Fork 7
40 lines (36 loc) · 1.26 KB
/
main.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
name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
native-py:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
max-parallel: 4
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Typing
# run mypy on all tracked non-test python modules
# and use explicit package base since the project
# is not set up as a python package
run: |
python -m mypy `git ls-tree --full-tree --name-only -r HEAD | grep ".py$" | grep -v "tests/"` --explicit-package-bases --follow-imports=normal
- name: Test
run: |
python -m unittest discover
# TODO - in the future, we might want to add automated tests for notebooks as well
# though it's not really possible right now since the notebooks are designed
# in a way that assumes interaction (i.e specifying model pack names)