-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (41 loc) · 1.18 KB
/
lint_test.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
name: lint and tests
on:
push:
branches: [ master ]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.12']
steps:
- uses: actions/checkout@v2
- name: setup python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: install deps
run: |
python -m pip install --upgrade pip setuptools wheel flake8 twine
python setup.py develop
pip install -e .[test,lint]
- name: lint
run: |
scripts/lint.sh
- name: tests
run: |
pytest -v tests
# Test the build and run twine to check we are pypi compatible
- name: check build
run: |
python setup.py bdist && twine check dist/*
# Even thought we have readthedocs build docs on every MR, this is useful
# because we build with -W --keep-going (see Makefile) and this will
# therefore fail on warnings that could be ignored by readthedocs and
# lead to half-broken docs
- name: build docs
run: |
cd docs
python -m pip install -r requirements.txt
make html