diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index bce1da0..cdf09d8 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -25,15 +25,25 @@ jobs: matrix: os: [macOS-latest, ubuntu-latest, windows-latest] python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"] + # Only test lowest and highest version on the expensive/slow + # macOS and windows runners (UPDATE when supported versions change): exclude: - - os: macOS-latest - python-version: 3.5 - os: macOS-latest python-version: 3.6 - os: macOS-latest python-version: 3.7 - os: macOS-latest python-version: 3.8 + - os: macOS-latest + python-version: 3.9 + - os: windows-latest + python-version: 3.6 + - os: windows-latest + python-version: 3.7 + - os: windows-latest + python-version: 3.8 + - os: windows-latest + python-version: 3.9 steps: - uses: actions/checkout@v2 @@ -78,3 +88,31 @@ jobs: flags: unittests fail_ci_if_error: true + + pypi_check: + name: Check source package integrity (for PyPi deployment) + if: "github.repository == 'alchemistry/alchemtest'" + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + + - name: Install tools + run: | + python -m pip install setuptools twine + + - name: Build alchemtest source dist + run: | + python setup.py sdist + + - name: Check package build sdist + run: | + DISTRIBUTION=$(ls -t1 dist/alchemtest-*.tar.gz | head -n 1) + test -n "${DISTRIBUTION}" || { echo "no distribution dist/alchemtest-*.tar.gz found"; exit 1; } + echo "twine check $DISTRIBUTION" + twine check $DISTRIBUTION