diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2020-12-17 21:51:01 +0100 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2020-12-17 21:51:01 +0100 |
commit | 8ddbc612971adeca7f9c829138a3eab8f6ed5a23 (patch) | |
tree | 0b15b272ce52254d67ac60ee651e9b4a4c86ff9b | |
parent | 57d1f5a905329b8b5f502f09dbd1434adf3efe46 (diff) | |
download | psutil-8ddbc612971adeca7f9c829138a3eab8f6ed5a23.tar.gz |
CI: run linters
Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
-rw-r--r-- | .github/workflows/build.yml (renamed from .github/workflows/ci.yml) | 27 | ||||
-rw-r--r-- | appveyor.yml | 2 |
2 files changed, 18 insertions, 11 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/build.yml index 6a4a019f..c8a98f79 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/build.yml @@ -9,8 +9,8 @@ # To skip certain builds see: # https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip -name: CI on: [push] +name: Build jobs: linux-macos-win: name: ${{ matrix.os }} @@ -25,12 +25,8 @@ jobs: - {name: Linux, python: '3.9', os: ubuntu-latest} env: CIBW_TEST_COMMAND: - PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_TESTING=1 PSUTIL_DEBUG=1 - python {project}/psutil/tests/runner.py && - PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_TESTING=1 PSUTIL_DEBUG=1 - python {project}/psutil/tests/test_memleaks.py && - find . -type f -iname "*.py" | xargs python -m flake8 --config=.flake8 && - find . -type f \( -iname "*.c" -o -iname "*.h" \) | xargs python scripts/internal/clinter.py + PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_TESTING=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/runner.py && + PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_TESTING=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/test_memleaks.py CIBW_TEST_EXTRAS: test CIBW_SKIP: cp35-* pp* steps: @@ -51,9 +47,8 @@ jobs: - name: Run tests run: | - pip install cibuildwheel flake8 + pip install cibuildwheel cibuildwheel . - - name: Create wheels uses: actions/upload-artifact@v2 with: @@ -88,10 +83,22 @@ jobs: set +e export \ PYTHONWARNINGS=always \ - PYTHONUNBUFFERED=1 \ PSUTIL_TESTING=1 \ PSUTIL_DEBUG=1 python3 -m pip install --user setuptools python3 setup.py install python3 psutil/tests/runner.py python3 psutil/tests/test_memleaks.py + + linters: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - name: 'Linters' + run: | + python -m pip install flake8 + python -m flake8 . + echo "flake8 linting OK" + find . -type f \( -iname "*.c" -o -iname "*.h" \) | xargs python scripts/internal/clinter.py + echo "C linting OK" diff --git a/appveyor.yml b/appveyor.yml index a0532206..aaf7de30 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -99,7 +99,7 @@ cache: # - might want to upload the content of dist/*.whl to a public wheelhouse skip_commits: - message: skip-ci + message: skip-appveyor # run build only if one of the following files is modified on commit only_commits: |