diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..dc4af16 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,116 @@ +name: tests + +on: + merge_group: + push: + branches-ignore: + # disabled for jaraco/skeleton#103 + # - gh-readonly-queue/** # Temporary merge queue-related GH-made branches + pull_request: + +permissions: + contents: read + +env: + # Environment variable to support color support (jaraco/skeleton#66) + FORCE_COLOR: 1 + + # Suppress noisy pip warnings + PIP_DISABLE_PIP_VERSION_CHECK: 'true' + PIP_NO_PYTHON_VERSION_WARNING: 'true' + PIP_NO_WARN_SCRIPT_LOCATION: 'true' + + # Ensure tests can sense settings about the environment + TOX_OVERRIDE: >- + testenv.pass_env+=GITHUB_*,FORCE_COLOR + + +jobs: + test: + strategy: + matrix: + python: + - "3.8" + - "3.11" + - "3.12" + platform: + - ubuntu-latest + - macos-latest + - windows-latest + include: + - python: "3.9" + platform: ubuntu-latest + - python: "3.10" + platform: ubuntu-latest + - python: pypy3.10 + platform: ubuntu-latest + runs-on: ${{ matrix.platform }} + continue-on-error: ${{ matrix.python == '3.13' }} + steps: + - uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + allow-prereleases: true + - name: Install tox + run: python -m pip install tox + - name: Run + run: tox + + collateral: + strategy: + fail-fast: false + matrix: + job: + - docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: 3.x + - name: Install tox + run: python -m pip install tox + - name: Eval ${{ matrix.job }} + run: tox -e ${{ matrix.job }} + + check: # This job does nothing and is only used for the branch protection + if: always() + + needs: + - test + - collateral + + runs-on: ubuntu-latest + + steps: + - name: Decide whether the needed jobs succeeded or failed + uses: re-actors/alls-green@release/v1 + with: + jobs: ${{ toJSON(needs) }} + + release: + permissions: + contents: write + needs: + - check + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: 3.x + - name: Install tox + run: python -m pip install tox + - name: Run + run: tox -e release + env: + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ed495c5..0000000 --- a/.travis.yml +++ /dev/null @@ -1,57 +0,0 @@ -sudo: false -language: python -python: - - 3.7 - - 3.8 - - 3.9 - - pypy3.7-7.3.2 - -cache: - directories: - - ~/.cache/pip - -env: - matrix: - - OPTIONAL=true - - OPTIONAL=false - global: - - PIP_WHEEL_DIR=$HOME/.cache/pip/wheels - - PIP_FIND_LINKS=file://$HOME/.cache/pip/wheels - - PYTHONHASHSEED=94967295 - -matrix: - fast_finish: true - allow_failures: - - python: pypy3.7-7.3.2 - exclude: - - python: pypy3.7-7.3.2 - env: OPTIONAL=true - -notifications: - email: - on_success: always - -branches: - except: - - /^v[0-9]/ - -before_install: - - pip install -U pip - - pip install wheel - -install: - - pip install -r dev-requirements.txt - - pip install -r requirements.txt - - | - if [[ "$OPTIONAL" == "true" ]]; then - pip wheel -r optional-requirements.txt - pip install -r optional-requirements.txt - fi - -script: - - manage lint && manage test - -after_success: - - if [[ "$TRAVIS_PULL_REQUEST" == "true" ]]; then exit 0; fi - - if [[ "$TRAVIS_BRANCH" != "master" ]]; then exit 0; fi - - if [[ "$TRAVIS_PYTHON_VERSION" != "3.9" ]]; then exit 0; fi diff --git a/README.rst b/README.rst index 35f6016..5715226 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ meza: A Python toolkit for processing tabular data ====================================================== -|travis| |versions| |pypi| +|GHA| |versions| |pypi| Index ----- @@ -626,8 +626,8 @@ License meza is distributed under the `MIT License`_. -.. |travis| image:: https://img.shields.io/travis/reubano/meza/master.svg - :target: https://app.travis-ci.com/github/reubano/meza +.. |GHA| image:: https://github.com/reubano/meza/actions/workflows/main.yml/badge.svg + :target: https://github.com/reubano/meza/actions?query=workflow%3A%22tests%22 .. |versions| image:: https://img.shields.io/pypi/pyversions/meza.svg :target: https://pypi.python.org/pypi/meza diff --git a/tox.ini b/tox.ini index 152cc9a..d6ce0a5 100644 --- a/tox.ini +++ b/tox.ini @@ -15,3 +15,16 @@ deps = -r{toxinidir}/dev-requirements.txt -r{toxinidir}/requirements.txt py{37,38,39}-{optional}: -r{toxinidir}/optional-requirements.txt + + +[testenv:docs] +deps = + docutils + +commands = + python -m docutils docs/AUTHORS.rst + python -m docutils docs/CHANGES.rst + python -m docutils docs/COOKBOOK.rst + python -m docutils docs/FAQ.rst + python -m docutils docs/INSTALLATION.rst + python -m docutils docs/TODO.rst