mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-24 20:10:15 -08:00
Python: Add Continuous Integration for Python
There are a lot of exceptions, but it's a start. This will ensure that no more issues get added / that issues get fixed before the code is added
This commit is contained in:
35
.github/workflows/check-python.yml
vendored
Normal file
35
.github/workflows/check-python.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Check Python code
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.10"]
|
||||
|
||||
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 dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r 00_Utilities/python/ci-requirements.txt
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
pytest 01_Acey_Ducey/python 02_Amazing/python
|
||||
- name: Test with mypy
|
||||
run: |
|
||||
mypy . --exclude 79_Slalom --exclude 27_Civil_War --exclude 38_Fur_Trader --exclude 81_Splat --exclude 09_Battle --exclude 40_Gomoko --exclude 36_Flip_Flop --exclude 43_Hammurabi --exclude 04_Awari --exclude 78_Sine_Wave --exclude 77_Salvo --exclude 34_Digits --exclude 17_Bullfight --exclude 16_Bug
|
||||
- name: Test with flake8
|
||||
run: |
|
||||
flake8 . --ignore E501,W504,W503,E741,F541,E203,W291,E722,E711,E712,F821,F401,E402,F841,E302,E731,E266
|
||||
Reference in New Issue
Block a user