Skip to content

Commit

Permalink
Switch CI to GitHub Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Nov 20, 2020
1 parent 1c7dccb commit 44fbb5b
Show file tree
Hide file tree
Showing 5 changed files with 128 additions and 73 deletions.
120 changes: 120 additions & 0 deletions .github/workflows/python_ci_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# This file is managed by 'repo_helper'. Don't edit it directly.
---
name: Linux Tests

on:
push:
pull_request:
branches: ["master"]

jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-18.04"
env:
USING_COVERAGE: '3.6,3.7,3.8,3.9'

strategy:
fail-fast: False
matrix:
python-version: ["3.6","3.7","3.8","3.9"]

steps:
- name: Checkout 🛎️
uses: "actions/checkout@v2"
- name: Setup Python 🐍
uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: Install dependencies 🔧
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox tox-gh-actions virtualenv
python -m pip install --upgrade coverage_pyver_pragma
- name: "Run Tests for Python ${{ matrix.python-version }}"
run: "python -m tox"


- name: "Upload Coverage"
uses: actions/upload-artifact@v2
with:
name: "coverage-${{ matrix.python-version }}"
path: .coverage


Coverage:
needs: tests
runs-on: "ubuntu-18.04"
steps:
- name: Checkout 🛎️
uses: "actions/checkout@v2"

- name: Setup Python 🐍
uses: "actions/setup-python@v2"
with:
python-version: 3.8

- name: Install dependencies 🔧
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade coveralls coverage_pyver_pragma
- name: "Download Coverage"
uses: actions/download-artifact@v2
with:
path: coverage

- name: Display structure of downloaded files
run: ls -R
working-directory: coverage

- name: Combine Coverage
run: |
shopt -s globstar
python -m coverage combine coverage/**/.coverage
- name: "Upload Combined Coverage Aretfact"
uses: actions/upload-artifact@v2
with:
name: "combined-coverage"
path: .coverage

- name: "Upload Combined Coverage to Coveralls"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls
Deploy:
needs: tests

runs-on: "ubuntu-18.04"
steps:
- name: Checkout 🛎️
uses: "actions/checkout@v2"

- name: Setup Python 🐍
uses: "actions/setup-python@v2"
with:
python-version: 3.8

- name: Install dependencies 🔧
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox
- name: Build distributions 📦
run: |
tox -e build
- name: Upload distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
skip_existing: true
67 changes: 0 additions & 67 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
Expand Up @@ -34,9 +34,9 @@ default_values
:target: https://github.com/domdfcoding/default_values/actions?query=workflow%3A%22Docs+Check%22
:alt: Docs Check Status

.. |travis| image:: https://img.shields.io/travis/com/domdfcoding/default_values/master?logo=travis
:target: https://travis-ci.com/domdfcoding/default_values
:alt: Travis Build Status
.. |travis| image:: https://github.com/domdfcoding/default_values/workflows/Linux%20Tests/badge.svg
:target: https://github.com/domdfcoding/default_values/actions?query=workflow%3A%Linux+Tests%22
:alt: Linux Test Status

.. |actions_windows| image:: https://github.com/domdfcoding/default_values/workflows/Windows%20Tests/badge.svg
:target: https://github.com/domdfcoding/default_values/actions?query=workflow%3A%22Windows+Tests%22
Expand Down
6 changes: 3 additions & 3 deletions doc-source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ default_values
:workflow: Docs Check
:alt: Docs Check Status

.. |travis| travis-shield::
:travis-site: com
:alt: Travis Build Status
.. |travis| actions-shield::
:workflow: Linux Tests
:alt: Linux Test Status

.. |actions_windows| actions-shield::
:workflow: Windows Tests
Expand Down
2 changes: 2 additions & 0 deletions repo_helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ classifiers:
- 'Topic :: Documentation'
- 'Topic :: Documentation :: Sphinx'
- 'Topic :: Software Development :: Documentation'

use_travis: false

0 comments on commit 44fbb5b

Please sign in to comment.