Skip to content

Commit

Permalink
Merge pull request #322 from hugovk/replace-travis-with-gha
Browse files Browse the repository at this point in the history
Replace Travis CI with GitHub Actions
  • Loading branch information
tartley committed Oct 7, 2021
2 parents 53e0db3 + 69f4644 commit 458a8bf
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 25 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Test

on: [push, pull_request, workflow_dispatch]

env:
FORCE_COLOR: 1

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["pypy2", "pypy3", "2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-latest, macos-latest, windows-latest]
include:
# Add new helper variables to existing jobs
- {python-version: "pypy2", toxenv: "pypy"}
- {python-version: "pypy3", toxenv: "pypy3"}
- {python-version: "2.7", toxenv: "py27"}
- {python-version: "3.5", toxenv: "py35"}
- {python-version: "3.6", toxenv: "py36"}
- {python-version: "3.7", toxenv: "py37"}
- {python-version: "3.8", toxenv: "py38"}
- {python-version: "3.9", toxenv: "py39"}
- {python-version: "3.10", toxenv: "py310"}

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
${{ matrix.os }}-${{ matrix.python-version }}-v1-${{ hashFiles('**/tox.ini') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.python-version }}-v1-
- name: Install dependencies
run: |
python -m pip install tox
- name: Tox tests
run: |
tox -e ${{ matrix.toxenv }}
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

7 changes: 3 additions & 4 deletions README-hacking.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ TODO: Add the use of release candidate versions to this checklist.
* Linux: `make test`

4. Verify you're all committed, merged to master, and pushed to origin (This
triggers a Travis build, which we'll check later on)
triggers a CI build, which we'll check later on)

5. Build the distributables (sdist and wheel), on either OS:

Expand All @@ -96,9 +96,8 @@ TODO: Add the use of release candidate versions to this checklist.
(This currently only tests the wheel, but
[should soon test the sdist too](https://github.com/tartley/colorama/issues/286).)

7. Check the [Travis builds](https://travis-ci.org/github/tartley/colorama)
are complete and all passing. (This currently only tests on Linux, but
[should soon run on Windows too](https://github.com/tartley/colorama/issues/283).)
7. Check the [CI builds](https://github.com/tartley/colorama/actions/)
are complete and all passing.

8. Upload the distributables to PyPI:

Expand Down
5 changes: 2 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
:target: https://pypi.org/project/colorama/
:alt: Supported Python versions

.. image:: https://travis-ci.org/tartley/colorama.svg?branch=master
:target: https://travis-ci.org/tartley/colorama
.. image:: https://github.com/tartley/colorama/actions/workflows/test.yml/badge.svg
:target: https://github.com/tartley/colorama/actions/workflows/test.yml
:alt: Build Status


Colorama
========

Expand Down

0 comments on commit 458a8bf

Please sign in to comment.