diff --git a/.github/workflows/test_3.8.yml b/.github/workflows/test_3.8.yml new file mode 100644 index 0000000..7b09df7 --- /dev/null +++ b/.github/workflows/test_3.8.yml @@ -0,0 +1,32 @@ +name: Test for Python 3.8 + +on: + push: + branches: [python3.8] + pull_request: + branches: [python3.8] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install black flake8 pytest + pip install -r requirements.txt + pip install . + - name: Check code style with Black + run: | + black -l 80 --check map_machine tests + - name: Lint with Flake8 + run: | + flake8 --max-line-length=80 --ignore=E203,W503 + - name: Test with pytest + run: | + pytest -v diff --git a/data/githooks/pre-commit b/data/githooks/pre-commit index 3206d43..41ddc82 100755 --- a/data/githooks/pre-commit +++ b/data/githooks/pre-commit @@ -13,5 +13,5 @@ echo "Lint with Flake8..." flake8 \ --max-line-length=80 \ --ignore=E203,W503,ANN002,ANN003,ANN101,ANN102 \ - --exclude=work,precommit.py,tests/test_road.py \ + --exclude=work,python3.8 \ || { echo "FAIL"; exit 1; }