From 841a19e802174865eff29862cdd5ddd8d7a7eba5 Mon Sep 17 00:00:00 2001 From: William Jamieson Date: Fri, 9 Dec 2022 13:21:03 -0500 Subject: [PATCH 1/2] Update packaging tests to use openastronomy publish workflow --- .github/workflows/ci.yml | 14 +++++--------- tox.ini | 28 ---------------------------- 2 files changed, 5 insertions(+), 37 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19bc575cd..886898915 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,16 +76,12 @@ jobs: package: needs: [test, dev, compatibility] - uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 + uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1 with: - submodules: false - toxdeps: "'tox<4'" - # Any env name which does not start with `pyXY` will use this Python version. - default_python: '3.9' - envs: | - - linux: twine - - linux: prerelease - - linux: packaged + upload_to_pypi: false + upload_to_anaconda: false + test_extras: tests + test_command: pytest --pyargs asdf asdf-schemas: name: ${{ matrix.package_name }} tests diff --git a/tox.ini b/tox.ini index c1d1d5834..5e6f72adb 100644 --- a/tox.ini +++ b/tox.ini @@ -28,39 +28,11 @@ commands= pip freeze pytest --remote-data -[testenv:s390x] -# As of 2020-01-23, The s390x container on Travis has a bug where -# /home/travis/.cache/pip/wheels is owned by root, which prevents -# us from installing packages unless we disable caching. -install_command= python -m pip install --no-cache-dir {opts} {packages} - -[testenv:prerelease] -pip_pre= true - -[testenv:packaged] -# The default tox working directory is in .tox in the source directory. If we -# execute pytest from there, it will discover tox.ini in the source directory -# and load the asdf module from the unpackaged sourcee, which is not what we -# want. The home directory does not have a tox.ini in any of its ancestors, -# so this will allow us to test the installed package. -usedevelop= false -changedir= {homedir} -commands= - pip freeze - pytest --pyargs asdf --remote-data - [testenv:egg_info] deps= commands= python setup.py egg_info -[testenv:twine] -usedevelop= false -deps= - twine -commands= - twine check {distdir}/* - [testenv:docbuild] extras= docs commands= From 4f090b0736b31b6197bb6d416be05f8cf8eacadf Mon Sep 17 00:00:00 2001 From: William Jamieson Date: Fri, 9 Dec 2022 13:23:21 -0500 Subject: [PATCH 2/2] Clean out old tox jobs --- tox.ini | 44 ++------------------------------------------ 1 file changed, 2 insertions(+), 42 deletions(-) diff --git a/tox.ini b/tox.ini index 5e6f72adb..317788ed9 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist= py38,style +envlist= py38,py39,py39 isolated_build = True [testenv] @@ -19,7 +19,7 @@ deps= legacy: numpy~=1.18 legacy: pytest~=6.0.0 legacy: astropy~=5.0.4 - numpydev,s390x: cython + numpydev: cython extras= all,tests # astropy will complain if the home directory is missing passenv= HOME @@ -28,30 +28,6 @@ commands= pip freeze pytest --remote-data -[testenv:egg_info] -deps= -commands= - python setup.py egg_info - -[testenv:docbuild] -extras= docs -commands= - pip freeze - sphinx-build -W docs build/docs - -[testenv:checkdocs] -deps= - collective.checkdocs - pygments -commands= - python setup.py checkdocs - -[testenv:style] -deps= - flake8 -commands= - flake8 --count - # coverage run must be used because the pytest-asdf plugin will interfere # with proper coverage measurement due to the order pytest loads its # entry points. @@ -71,19 +47,3 @@ extras= all,tests commands= pip freeze pytest compatibility_tests/ --remote-data - -[testenv:bandit] -deps= - bandit - toml -commands= - bandit -c bandit.yaml -r . - -[testenv:codestyle] -skip_install = true -description = Run all style and file checks with pre-commit -deps = - pre-commit -commands = - pre-commit install-hooks - pre-commit run {posargs:--color always --all-files --show-diff-on-failure}