Skip to content

Commit

Permalink
Merge pull request #53 from jaraco/feature/gha
Browse files Browse the repository at this point in the history
Migrate to GitHub Actions
  • Loading branch information
jaraco committed Feb 19, 2024
2 parents fc08323 + bddfdb2 commit 24e520a
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 60 deletions.
116 changes: 116 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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 }}
57 changes: 0 additions & 57 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
meza: A Python toolkit for processing tabular data
======================================================

|travis| |versions| |pypi|
|GHA| |versions| |pypi|

Index
-----
Expand Down Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 24e520a

Please sign in to comment.