Merge pull request #2 from c-bata/gh-action-python-tests

Run tests and linters on GitHub Action
This commit is contained in:
Masashi SHIBATA authored and GitHub committed 2020-10-26 17:15:15 +09:00
commit fb776ef312
2 files changed
+38

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
name: tests
on:
pull_request:
branches:
- main
paths:
- '.github/workflows/python-tests.yml'
- '**.py'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
architecture: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install --progress-bar off .[lint]
- run: flake8 . --show-source
- run: black --check .
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
architecture: x64
- name: Install dependencies
run: pip install --progress-bar off .
- run: python setup.py test