-
Notifications
You must be signed in to change notification settings - Fork 5
65 lines (53 loc) · 1.65 KB
/
ci.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
name: CI
on:
push:
branches:
- '**'
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
pyversion: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.pyversion }}
- name: Cache pip
uses: actions/cache@v1
with:
path: ~/.cache/pip # This path is specific to Ubuntu
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install pip requirements
run: |
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
pip install --upgrade -r requirements_dev.txt
- name: Install APT requirements
run: |
sudo apt-get install texlive-latex-recommended texlive-latex-extra dvipng cm-super
- name: Run flake8
run: flake8 hidden_context tests
if: ${{ always() }}
- name: Run black
run: black --check hidden_context tests
if: ${{ always() }}
- name: Run isort
run: isort --check --diff hidden_context tests
if: ${{ always() }}
- name: Check types
if: ${{ always() }}
run: |
mypy hidden_context tests
- name: Run tests
if: ${{ always() }}
timeout-minutes: 10
run: |
pytest -m "not uses_huggingface" --log-cli-level=INFO