Skip to content

Commit 4f7fd89

Browse files
authored
Merge pull request #3 from kgisl/master
Added github workflow action to deploy changes on "push"
2 parents 5e581d6 + 75ef457 commit 4f7fd89

File tree

4 files changed

+78
-12
lines changed

4 files changed

+78
-12
lines changed

.github/workflows/flake8.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Code Quality
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
lint:
11+
name: Python Lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-python@v2
16+
with:
17+
python-version: "2.7"
18+
- name: Run flake8
19+
uses: TrueBrain/actions-flake8@master
20+
with:
21+
path: Sources/code
22+
ignore: E9,F63,F7,F82,E203,W293,E231,W291,W391,E265,E266,E226,E301,E228,E401,E303,E201,E202,E305,E501,E261
23+
24+
25+
26+

.github/workflows/main.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Python package
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: [3.8]
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install flake8 pytest
23+
if [ -f Sources/requirements.txt ]; then pip install -r Sources/requirements.txt; fi
24+
# - name: Lint with flake8
25+
# run: |
26+
# stop the build if there are Python syntax errors or undefined names
27+
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
28+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
29+
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
30+
#- name: Test with pytest
31+
# run: |
32+
# pytest
33+
- name: Build static site
34+
run: |
35+
cd ./Sources; make html
36+
37+
- name: Deploy
38+
uses: peaceiris/actions-gh-pages@v3
39+
with:
40+
github_token: ${{ secrets.GITHUB_TOKEN }}
41+
publish_dir: ./Sources/build/html

Sources/requirements.txt

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
Jinja2==2.7.2
2-
MarkupSafe==0.19
3-
Pygments==1.6
4-
Sphinx==1.2.2
5-
docutils==0.11
6-
sphinx-rtd-theme==0.1.6
7-
gnureadline==6.2.5
8-
# hieroglyph==0.7.dev
9-
-e git+https://github.com/nyergler/hieroglyph.git#egg=hieroglyph
10-
ipython==2.3.0
11-
libsass==0.5.1
1+
Jinja2
2+
MarkupSafe
3+
Pygments
4+
Sphinx
5+
docutils
6+
sphinx-rtd-theme
7+
gnureadline
8+
hieroglyph
9+
ipython
10+
libsass

Sources/source/where_to_put_tests.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ https://docs.pytest.org/en/stable/goodpractices.html
2020

2121
For ``nose``, read https://nose.readthedocs.io/en/latest/finding_tests.html
2222

23-
and for ``unittest`` read https://docs.python.org/3/library/unittest.html#test-discovery .
23+
and for ``unittest`` read https://docs.python.org/3/library/unittest.html#test-discovery.
2424

2525

2626
Two Options

0 commit comments

Comments
 (0)