diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2020-11-15 02:32:48 +0100 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2020-11-15 02:32:48 +0100 |
commit | 50f665d4ae0ee79ed552c3428b74564abde92cca (patch) | |
tree | c29b5a281e8b3d04808326584deb75962cc63106 | |
parent | 5cb1fcd7f441363dd801c79a06b762a731ff8ca9 (diff) | |
download | psutil-50f665d4ae0ee79ed552c3428b74564abde92cca.tar.gz |
another attempt
-rw-r--r-- | .github/workflows/build_wheel.yml | 118 | ||||
-rw-r--r-- | .github/workflows/freebsd.yml | 3 | ||||
-rwxr-xr-x | psutil/tests/test_system.py | 10 |
3 files changed, 64 insertions, 67 deletions
diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index 1a80978e..92fd2c80 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -1,59 +1,59 @@ -# name: Linux, macOS, Windows, FreeBSD - -# on: [push, pull_request] - -# jobs: -# linux-osx-win: -# name: ${{ matrix.os }} -# runs-on: ${{ matrix.os }} -# timeout-minutes: 30 -# strategy: -# fail-fast: false # whether to exit the whole run on first failure -# matrix: -# os: [ubuntu-latest, macos-latest, windows-latest] -# include: -# - {name: Linux, python: '3.9', os: ubuntu-latest} -# env: -# CIBW_TEST_COMMAND: python -u -Wa {project}/psutil/tests/runner.py -# CIBW_TEST_COMMAND_MACOS: LC_ALL='en_US.utf8' python -Wa {project}/psutil/tests/runner.py -# CIBW_TEST_EXTRAS: test -# # https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip -# CIBW_SKIP: cp35-* pp* -# steps: -# - uses: actions/checkout@v2 -# - uses: actions/setup-python@v2 -# with: -# python-version: 3.9 - -# - name: (Windows) install Visual C++ for Python 2.7 -# if: matrix.os == 'windows-latest' -# run: | -# choco install vcpython27 -f -y - -# - name: Run tests -# run: | -# pip install cibuildwheel -# cibuildwheel . - -# - name: Run tests -# run: | -# pip install cibuildwheel -# cibuildwheel . - -# - name: Run memleak tests -# if: endsWith(matrix.python-version, '3.9') -# run: python -Wa {project}/psutil/tests/test_memleaks.py - -# - name: Create wheels -# uses: actions/upload-artifact@v2 -# with: -# name: wheels -# path: wheelhouse - -# - name: Print hashes -# if: matrix.os == 'ubuntu-latest' -# run: | -# make generate-manifest -# python setup.py sdist -# mv dist/psutil*.tar.gz wheelhouse/ -# python scripts/internal/print_hashes.py wheelhouse/ +name: Linux, macOS, Windows + +on: [push, pull_request] + +jobs: + linux-osx-win: + name: ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false # whether to exit the whole run on first failure + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + include: + - {name: Linux, python: '3.9', os: ubuntu-latest} + env: + CIBW_TEST_COMMAND: python -u -Wa {project}/psutil/tests/runner.py + CIBW_TEST_COMMAND_MACOS: LC_ALL='en_US.utf8' python -Wa {project}/psutil/tests/runner.py + CIBW_TEST_EXTRAS: test + # https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip + CIBW_SKIP: cp35-* pp* + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.9 + + - name: (Windows) install Visual C++ for Python 2.7 + if: matrix.os == 'windows-latest' + run: | + choco install vcpython27 -f -y + + - name: Run tests + run: | + pip install cibuildwheel + cibuildwheel . + + - name: Run tests + run: | + pip install cibuildwheel + cibuildwheel . + + - name: Run memleak tests + if: endsWith(matrix.python-version, '3.9') + run: python -Wa {project}/psutil/tests/test_memleaks.py + + - name: Create wheels + uses: actions/upload-artifact@v2 + with: + name: wheels + path: wheelhouse + + - name: Print hashes + if: matrix.os == 'ubuntu-latest' + run: | + make generate-manifest + python setup.py sdist + mv dist/psutil*.tar.gz wheelhouse/ + python scripts/internal/print_hashes.py wheelhouse/ diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml index 4a8b209c..949449e1 100644 --- a/.github/workflows/freebsd.yml +++ b/.github/workflows/freebsd.yml @@ -17,7 +17,4 @@ jobs: python3 -m pip install --user setuptools python3 setup.py install python3 psutil/tests/runner.py - - - name: Run memleak tests - run: | python3 psutil/tests/test_memleaks.py diff --git a/psutil/tests/test_system.py b/psutil/tests/test_system.py index 66cfdb24..69f318b4 100755 --- a/psutil/tests/test_system.py +++ b/psutil/tests/test_system.py @@ -651,11 +651,11 @@ class TestDiskAPIs(PsutilTestCase): path = os.path.dirname(path) return path.lower() - # mount = find_mount_point(__file__) - # mounts = [x.mountpoint.lower() for x in - # psutil.disk_partitions(all=True) if x.mountpoint] - # self.assertIn(mount, mounts) - # psutil.disk_usage(mount) + mount = find_mount_point(__file__) + mounts = [x.mountpoint.lower() for x in + psutil.disk_partitions(all=True) if x.mountpoint] + self.assertIn(mount, mounts) + psutil.disk_usage(mount) @unittest.skipIf(LINUX and not os.path.exists('/proc/diskstats'), '/proc/diskstats not available on this linux version') |