Skip to content

Commit

Permalink
workflow: add coverage and code lint
Browse files Browse the repository at this point in the history
  • Loading branch information
wang0618 committed Apr 20, 2020
1 parent c14c996 commit 3aeb5f1
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 398 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will install Python dependencies and lint with a variety of Python versions

name: Python lint

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 pywebio --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 pywebio --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
9 changes: 6 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Tests
on: [push, pull_request]
jobs:
build:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -18,6 +18,9 @@ jobs:
uses: percy/exec-action@v0.2.0
with:
command: "test/run_all.sh"
verbose: true
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
- name: Upload Codecov Report
run: |
cd test
bash <(curl -s https://codecov.io/bash)
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<a href="https://percy.io/pywebio/pywebio">
<img src="https://percy.io/static/images/percy-badge.svg" alt="Percy visual test">
</a>
<a href="https://codecov.io/gh/wang0618/PyWebIO">
<img src="https://codecov.io/gh/wang0618/PyWebIO/branch/dev/graph/badge.svg" />
</a>
<a href="https://pywebio.readthedocs.io/zh_CN/latest/?badge=latest">
<img src="https://readthedocs.org/projects/pywebio/badge/?version=latest" alt="Documentation Status">
</a>
Expand Down
Empty file removed pywebio/demos/__init__.py
Empty file.
Empty file removed pywebio/demos/zh/__init__.py
Empty file.
Loading

0 comments on commit 3aeb5f1

Please sign in to comment.