@@ -12,6 +12,78 @@ defaults:
1212 shell : bash
1313
1414jobs :
15+ black :
16+ runs-on : ubuntu-20.04
17+ steps :
18+ - uses : actions/checkout@v2
19+ - name : Install Black
20+ run : pip install black
21+ - name : Run Black
22+ run : black --check --diff examples/ scripts/ tcod/ tests/ *.py
23+
24+ isort :
25+ runs-on : ubuntu-20.04
26+ steps :
27+ - uses : actions/checkout@v2
28+ - name : Install isort
29+ run : pip install isort
30+ - name : isort
31+ uses : liskin/gh-problem-matcher-wrap@v1
32+ with :
33+ linters : isort
34+ run : isort scripts/ tcod/ tests/ --check --diff
35+ - name : isort (examples)
36+ uses : liskin/gh-problem-matcher-wrap@v1
37+ with :
38+ linters : isort
39+ run : isort examples/ --check --diff --thirdparty tcod
40+
41+ flake8 :
42+ runs-on : ubuntu-20.04
43+ steps :
44+ - uses : actions/checkout@v2
45+ - name : Install Flake8
46+ run : pip install Flake8
47+ - name : Flake8
48+ uses : liskin/gh-problem-matcher-wrap@v1
49+ with :
50+ linters : flake8
51+ run : flake8 scripts/ tcod/ tests/
52+
53+ mypy :
54+ runs-on : ubuntu-20.04
55+ steps :
56+ - uses : actions/checkout@v2
57+ - name : Checkout submodules
58+ run : git submodule update --init --recursive --depth 1
59+ - name : Install Python dependencies
60+ run : pip install mypy pytest types-tabulate -r requirements.txt
61+ - name : Fake initialize package
62+ run : |
63+ echo '__version__ = ""' > tcod/version.py
64+ - name : Mypy
65+ uses : liskin/gh-problem-matcher-wrap@v1
66+ with :
67+ linters : mypy
68+ run : mypy --show-column-numbers .
69+
70+ # This makes sure that the latest versions of the SDL headers parse correctly.
71+ parse_sdl :
72+ runs-on : ${{ matrix.os }}
73+ strategy :
74+ matrix :
75+ os : ["windows-2019", "macos-11"]
76+ sdl-version : ["2.0.14", "2.0.16"]
77+ fail-fast : true
78+ steps :
79+ - uses : actions/checkout@v1 # v1 required to build package.
80+ - name : Checkout submodules
81+ run : git submodule update --init --recursive --depth 1
82+ - name : Build package
83+ run : ./setup.py build
84+ env :
85+ SDL_VERSION : ${{ matrix.sdl-version }}
86+
1587 build :
1688 runs-on : ${{ matrix.os }}
1789 strategy :
0 commit comments