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
|
||||
|
||||
on: [push, pull_request]
|
||||
@ -14,17 +11,21 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v1
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
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: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install flake8
|
||||
flake8 . --count --show-source --statistics
|
||||
python -m pip install --upgrade pip setuptools wheel
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install ".[dev]"
|
||||
pip install ".[dev]" --upgrade
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
pytest test --cov tianshou --cov-report=xml --durations 0 -v
|
||||
|
Loading…
x
Reference in New Issue
Block a user