Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
name: CI

on:
push:
branches:
- master
- v[0-9]+.[0-9]+.x
- gha-.+
pull_request:
branches:
- master
- v[0-9]+.[0-9]+.x

jobs:
tests:
name: Test suite
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
pip install -r requirements.txt -r dev-requirements.txt
- name: Check code style
run: make quality
- name: Install test package
run: python setup.py develop
- name: Run pytest
run: make test_norecord
- name: Upload coverage data to coveralls.io
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
COVERALLS_PARALLEL: true

coveralls:
# Would be very nice to find an alternative implementation that doesn't
# pollute the list of checks on PRs someday, but this seems unlikely.
name: Finalize job on coveralls.io
needs: tests
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Notify coveralls.io
run: |
pip install --upgrade coveralls
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Upload Python Package

on:
release:
types: [ published ]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install -r requirements.txt -r dev-requirements.txt
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
47 changes: 0 additions & 47 deletions .travis.yml

This file was deleted.

14 changes: 2 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: quality test coverage_html coverage_report travis clean_doc build_doc install-hooks uninstall-hooks
.PHONY: quality test test_norecord test_novcr vcr_rerecord qa clean_docs build_docs docs cleandoc install-hooks uninstall-hooks

quality:
./checkstyle.sh
Expand All @@ -19,17 +19,7 @@ vcr_rerecord:
rm -rf ./test/vcr/*
coverage run -m py.test -v . --vcr-record=all

coverage_report:
coverage report

coverage_html:
coverage html

coverages: coverage_report coverage_html

qa: quality test coverages

travis: quality test_norecord coverage_report
qa: quality test

clean_docs:
$(MAKE) -C docs clean
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ Open Collective profile, for transparency.

.. |version| image:: https://img.shields.io/pypi/v/sopel.svg
:target: https://pypi.python.org/pypi/sopel
.. |build| image:: https://travis-ci.org/sopel-irc/sopel.svg?branch=master
:target: https://travis-ci.org/sopel-irc/sopel
.. |build| image:: https://github.com/sopel-irc/sopel/actions/workflows/ci.yml/badge.svg?branch=master&event=push
:target: https://github.com/sopel-irc/sopel/actions/workflows/ci.yml?query=branch%3Amaster+event%3Apush
.. |issues| image:: https://img.shields.io/github/issues/sopel-irc/sopel.svg
:target: https://github.com/sopel-irc/sopel/issues
.. |alerts| image:: https://img.shields.io/lgtm/alerts/g/sopel-irc/sopel.svg
Expand Down