diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml new file mode 100644 index 0000000..ec2b138 --- /dev/null +++ b/.github/workflows/flake8.yml @@ -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 diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index df56ab5..eb14a87 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -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