Skip to content

Commit

Permalink
restore tests
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Dec 18, 2023
1 parent c19fa04 commit 517d389
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 93 deletions.
46 changes: 23 additions & 23 deletions .github/workflows/bsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@
# https://github.com/vmactions/openbsd-vm
# https://github.com/vmactions/netbsd-vm

# on: [push, pull_request]
# name: bsd-tests
# concurrency:
# group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && github.sha || '' }}
# cancel-in-progress: true
# jobs:
# freebsd:
# runs-on: macos-12
# steps:
# - uses: actions/checkout@v4
# - name: Run tests
# uses: vmactions/freebsd-vm@v1
# with:
# usesh: true
# prepare: |
# pkg install -y gcc python3
# run: |
# set -e -x
# make install-pip
# python3 -m pip install --user setuptools
# make install
# make test
# make test-memleaks
on: [push, pull_request]
name: bsd-tests
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && github.sha || '' }}
cancel-in-progress: true
jobs:
freebsd:
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- name: Run tests
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
pkg install -y gcc python3
run: |
set -e -x
make install-pip
python3 -m pip install --user setuptools
make install
make test
make test-memleaks
# openbsd:
# runs-on: macos-12
# steps:
Expand Down
137 changes: 67 additions & 70 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,12 @@ jobs:
fail-fast: false
matrix:
include:
# - os: ubuntu-latest
# archs: "x86_64 i686"
# - os: macos-12
# archs: "x86_64 arm64"
- os: ubuntu-latest
archs: "x86_64 i686"
- os: macos-12
archs: "x86_64 arm64"
- os: windows-2019
archs: "AMD64"
# - os: windows-2019
# archs: "x86"

archs: "x86 AMD64"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
Expand All @@ -59,71 +56,71 @@ jobs:
python setup.py sdist
mv dist/psutil*.tar.gz wheelhouse/
# Linux + macOS + Python 2
# py2:
# name: py2-${{ matrix.os }}
# runs-on: ${{ matrix.os }}
# timeout-minutes: 20
# strategy:
# fail-fast: false
# matrix:
# os: [ubuntu-latest, macos-12]
# env:
# CIBW_TEST_COMMAND:
# PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/runner.py &&
# PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/test_memleaks.py
# CIBW_TEST_EXTRAS: test
# CIBW_BUILD: 'cp27-*'
Linux + macOS + Python 2
py2:
name: py2-${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-12]
env:
CIBW_TEST_COMMAND:
PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/runner.py &&
PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/test_memleaks.py
CIBW_TEST_EXTRAS: test
CIBW_BUILD: 'cp27-*'

# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v4
# with:
# python-version: 3.9
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.9

# - name: Create wheels + run tests
# uses: pypa/[email protected]
- name: Create wheels + run tests
uses: pypa/[email protected]

# - name: Upload wheels
# uses: actions/upload-artifact@v3
# with:
# name: wheels
# path: wheelhouse
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: wheelhouse

# - name: Generate .tar.gz
# if: matrix.os == 'ubuntu-latest'
# run: |
# make generate-manifest
# python setup.py sdist
# mv dist/psutil*.tar.gz wheelhouse/
- name: Generate .tar.gz
if: matrix.os == 'ubuntu-latest'
run: |
make generate-manifest
python setup.py sdist
mv dist/psutil*.tar.gz wheelhouse/
# # Run linters
# linters:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v4
# with:
# python-version: 3.x
# - name: 'Run linters'
# run: |
# python3 -m pip install ruff rstcheck toml-sort sphinx
# make lint-all
# Run linters
linters:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.x
- name: 'Run linters'
run: |
python3 -m pip install ruff rstcheck toml-sort sphinx
make lint-all
# # Check sanity of .tar.gz + wheel files
# check-dist:
# needs: [py2, py3]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v4
# with:
# python-version: 3.x
# - uses: actions/download-artifact@v3
# with:
# name: wheels
# path: wheelhouse
# - run: |
# python scripts/internal/print_hashes.py wheelhouse/
# pipx run twine check --strict wheelhouse/*
# pipx run abi3audit --verbose --strict wheelhouse/*-abi3-*.whl
# Check sanity of .tar.gz + wheel files
check-dist:
needs: [py2, py3]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: actions/download-artifact@v3
with:
name: wheels
path: wheelhouse
- run: |
python scripts/internal/print_hashes.py wheelhouse/
pipx run twine check --strict wheelhouse/*
pipx run abi3audit --verbose --strict wheelhouse/*-abi3-*.whl

0 comments on commit 517d389

Please sign in to comment.