seperate flake8 lint
This commit is contained in:
parent
513573ea82
commit
b32b96cd3e
19
.github/workflows/flake8.yml
vendored
Normal file
19
.github/workflows/flake8.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
name: PEP8 Check
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up Python 3.8
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.8
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install flake8
|
||||||
|
- name: Lint with flake8
|
||||||
|
run: |
|
||||||
|
flake8 . --count --show-source --statistics
|
19
.github/workflows/pytest.yml
vendored
19
.github/workflows/pytest.yml
vendored
@ -1,6 +1,3 @@
|
|||||||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
|
||||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
|
||||||
|
|
||||||
name: Unittest
|
name: Unittest
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
@ -14,17 +11,21 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v1
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Lint with flake8
|
# - uses: actions/cache@v2
|
||||||
|
# with:
|
||||||
|
# path: /opt/hostedtoolcache/Python/
|
||||||
|
# key: ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
|
||||||
|
# restore-keys: |
|
||||||
|
# ${{ runner.os }}-${{ matrix.python-version }}-
|
||||||
|
- name: Upgrade pip
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip setuptools wheel
|
||||||
pip install flake8
|
|
||||||
flake8 . --count --show-source --statistics
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
pip install ".[dev]"
|
pip install ".[dev]" --upgrade
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
pytest test --cov tianshou --cov-report=xml --durations 0 -v
|
pytest test --cov tianshou --cov-report=xml --durations 0 -v
|
||||||
|
Loading…
x
Reference in New Issue
Block a user