-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (53 loc) · 1.78 KB
/
test_and_lint.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
name: Test and Lint
on: pull_request
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8, 3.9]
os: [ubuntu-latest] # add macOS-latest and windows-latest later
steps:
- uses: actions/checkout@v1
- name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: '2.6' # Version range or exact version of a Ruby version to use, using semvers version range syntax.
- name: Install Ruby Dependencies
run: |
sudo apt install libcurl4-openssl-dev
gem install html-proofer
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test with doctest
run: |
cd form_submit/templates/docs
make html
make doctest
htmlproofer _build/html --allow_hash_href --file_ignore "_build/html/search.html" --url-ignore https://rawgit.com/AguaClara/aide_design_specs/test/html/index.html
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with flake8
run: |
flake8 aide_doc --count --verbose --show-source --statistics
flake8 form_submit --count --verbose --show-source --statistics
- name: Check with black
run: |
black --check aide_doc
black --check form_submit