Skip to content

Commit

Permalink
Add syntax checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Jeitner committed Nov 28, 2023
1 parent 7d3b2f6 commit 3f195ed
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 81 deletions.
30 changes: 20 additions & 10 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,26 @@ permissions:
contents: read

jobs:
build:

test-offline:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
test-api-live:
needs: test-offline
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
Expand All @@ -26,14 +42,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# - name: Lint with flake8
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest --log-cli-level=DEBUG
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
.PHONY: test build upload clean
.PHONY: test-offline test-api-live build upload clean

all:
@echo "usage: make [test | build | upload | clean]"

test:
test-offline:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

test-api-live:
pytest --log-cli-level=DEBUG

build:
Expand Down
69 changes: 0 additions & 69 deletions src/purei9_unofficial/imageascii2.py

This file was deleted.

0 comments on commit 3f195ed

Please sign in to comment.