diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml new file mode 100644 index 0000000..ef1acaf --- /dev/null +++ b/.github/workflows/flake8.yml @@ -0,0 +1,26 @@ +name: Code Quality + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + lint: + name: Python Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: "2.7" + - name: Run flake8 + uses: TrueBrain/actions-flake8@master + with: + path: Sources/code + ignore: E9,F63,F7,F82,E203,W293,E231,W291,W391,E265,E266,E226,E301,E228,E401,E303,E201,E202,E305,E501,E261 + + + + diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..a17a980 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,41 @@ +name: Python package + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.8] + + 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 flake8 pytest + if [ -f Sources/requirements.txt ]; then pip install -r Sources/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 + - name: Build static site + run: | + cd ./Sources; make html + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./Sources/build/html diff --git a/Sources/requirements.txt b/Sources/requirements.txt index 4666c46..69b433d 100644 --- a/Sources/requirements.txt +++ b/Sources/requirements.txt @@ -1,11 +1,10 @@ -Jinja2==2.7.2 -MarkupSafe==0.19 -Pygments==1.6 -Sphinx==1.2.2 -docutils==0.11 -sphinx-rtd-theme==0.1.6 -gnureadline==6.2.5 -# hieroglyph==0.7.dev --e git+https://github.com/nyergler/hieroglyph.git#egg=hieroglyph -ipython==2.3.0 -libsass==0.5.1 +Jinja2 +MarkupSafe +Pygments +Sphinx +docutils +sphinx-rtd-theme +gnureadline +hieroglyph +ipython +libsass diff --git a/Sources/source/where_to_put_tests.rst b/Sources/source/where_to_put_tests.rst index c569af6..ef68f21 100644 --- a/Sources/source/where_to_put_tests.rst +++ b/Sources/source/where_to_put_tests.rst @@ -20,7 +20,7 @@ https://docs.pytest.org/en/stable/goodpractices.html For ``nose``, read https://nose.readthedocs.io/en/latest/finding_tests.html -and for ``unittest`` read https://docs.python.org/3/library/unittest.html#test-discovery . +and for ``unittest`` read https://docs.python.org/3/library/unittest.html#test-discovery. Two Options