forked from freeorion/freeorion
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (52 loc) · 2 KB
/
python-check.yml
File metadata and controls
52 lines (52 loc) · 2 KB
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
name: AI linters and tests
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
jobs:
lint-and-test-python:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.9']
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 development dependencies
run: pip install -r default/python/requirements-dev.txt
- name: Lint with flake8
# Run from root to preserve full path in output
run: >
flake8 default/python
--config=default/python/tox.ini
--format="::error file=%(path)s,line=%(row)d,col=%(col)d::%(path)s:%(row)d:%(col)d: %(code)s %(text)s"
- name: Lint FOCS with flake8
# Run from root to preserve full path in output
run: >
flake8 default/scripting
--config=default/scripting/tox.ini
--format="::error file=%(path)s,line=%(row)d,col=%(col)d::%(path)s:%(row)d:%(col)d: %(code)s %(text)s"
- name: Lint FOCS tests with flake8
# Run from root to preserve full path in output
run: >
flake8 test-scripting
--config=test-scripting/tox.ini
--format="::error file=%(path)s,line=%(row)d,col=%(col)d::%(path)s:%(row)d:%(col)d: %(code)s %(text)s"
- name: Lint st-tool with flake8
# Run from root to preserve full path in output
run: >
flake8 check
--config=default/scripting/tox.ini
--format="::error file=%(path)s,line=%(row)d,col=%(col)d::%(path)s:%(row)d:%(col)d: %(code)s %(text)s"
- name: Test with pytest
# Run from root to preserve full path in output
run: pytest -v default/python/tests
- name: Test st-tool with pytest
# Run from root to preserve full path in output
run: pytest -v check --doctest-modules --doctest-continue-on-failure