Skip to content

Commit

Permalink
Switch CI to GitHub Actions
Browse files Browse the repository at this point in the history
Travis.org no longer runs CI for us. If we have to migrate anyhow we might just go directly to GitHub actions and loose the additional dependency.
  • Loading branch information
matthias-bach-by committed Sep 10, 2021
1 parent 59562c8 commit ea5e0b8
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 27 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/publish.yml
@@ -0,0 +1,26 @@
name: Upload Release ot PyPI

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
49 changes: 49 additions & 0 deletions .github/workflows/tests.yml
@@ -0,0 +1,49 @@
name: Tests

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

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install --no-deps -e .
python -m pip install coveralls
python -m pip freeze
- name: Test with pytest
run: |
pytest
- name: Upload coverage data
run: |
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.test-name }}
COVERALLS_PARALLEL: true
coveralls:
name: Indicate completion to coveralls.io
needs: test
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
python -m pip install coveralls
coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

3 changes: 0 additions & 3 deletions README.rst
Expand Up @@ -2,9 +2,6 @@
Brandon the Devpi Builder
=========================

.. image:: https://travis-ci.org/blue-yonder/devpi-builder.svg?branch=master
:alt: Build Status
:target: https://travis-ci.org/blue-yonder/devpi-builder
.. image:: https://coveralls.io/repos/blue-yonder/devpi-builder/badge.svg?branch=master
:alt: Coverage Status
:target: https://coveralls.io/r/blue-yonder/devpi-builder?branch=master
Expand Down

0 comments on commit ea5e0b8

Please sign in to comment.