Skip to content

Commit

Permalink
Drop travis-ci.org and use github-actions for pypi release (#2487)
Browse files Browse the repository at this point in the history
* Drop travis-ci.org and use github-actions for pypi release

* Bump gh-action-pypi-publish to v1.4.2
  • Loading branch information
misl6 authored Sep 5, 2021
1 parent 1ca2f8c commit 1d8f773
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 84 deletions.
13 changes: 8 additions & 5 deletions .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# used by coveralls.io, refs:
# https://coveralls-python.readthedocs.io/en/latest/usage/tox.html#travisci
# https://coveralls-python.readthedocs.io/en/latest/usage/tox.html#github-actions
CI
TRAVIS
TRAVIS_BRANCH
TRAVIS_JOB_ID
TRAVIS_PULL_REQUEST
GITHUB_ACTIONS
GITHUB_REF
GITHUB_SHA
GITHUB_HEAD_REF
GITHUB_REPOSITORY
GITHUB_RUN_ID
GITHUB_TOKEN
25 changes: 25 additions & 0 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: PyPI release
on: [push]

jobs:
pypi_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade setuptools wheel twine
- name: Build
run: |
python setup.py sdist bdist_wheel
twine check dist/*
- name: Publish package
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.pypi_password }}
71 changes: 0 additions & 71 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
python-for-android
==================

[![Build Status](https://travis-ci.org/kivy/python-for-android.svg?branch=develop)](https://travis-ci.org/kivy/python-for-android)
[![Unit tests & build apps](https://github.com/kivy/python-for-android/workflows/Unit%20tests%20&%20build%20apps/badge.svg?branch=develop)](https://github.com/kivy/python-for-android/actions?query=workflow%3A%22Unit+tests+%26+build+apps%22)
[![Coverage Status](https://coveralls.io/repos/github/kivy/python-for-android/badge.svg?branch=develop&kill_cache=1)](https://coveralls.io/github/kivy/python-for-android?branch=develop)
[![Backers on Open Collective](https://opencollective.com/kivy/backers/badge.svg)](#backers)
Expand Down
3 changes: 1 addition & 2 deletions doc/source/contribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,8 @@ Release checklist
::

- [ ] Check that the builds are passing
- [ ] [Travis build](https://travis-ci.org/kivy/python-for-android)
- [ ] [GitHub Action](https://github.com/kivy/python-for-android/actions)
- [ ] Run the tests locally via `tox`: this performs some long-running tests that are skipped on Travis.
- [ ] Run the tests locally via `tox`: this performs some long-running tests that are skipped on github-actions.
- [ ] Build and run the [on_device_unit_tests](https://github.com/kivy/python-for-android/tree/master/testapps/on_device_unit_tests) app using buildozer. Check that they all pass.
- [ ] Build (or download from github actions) and run the following [testapps](https://github.com/kivy/python-for-android/tree/master/testapps/on_device_unit_tests) for arch `armeabi-v7a` and `arm64-v8a`:
- [ ] on_device_unit_tests
Expand Down
2 changes: 1 addition & 1 deletion doc/source/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ using headless VirtualBox and a small distro to run itself on.

While this is not the actively supported way to build applications, if you are
willing to play with the approach, you can use the ``Dockerfile`` to build
the Docker image we use in ``.travis.yml`` for CI builds and create an Android
the Docker image we use for CI builds and create an Android
application with that in a container. This approach allows you to build Android
applications on all platforms Docker engine supports. These steps assume you
already have Docker preinstalled and set up.
Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def get_recipe_env(self, arch=None, with_flags_in_cc=True):
# we have the proper package already downloaded, it will use the cached
# package to successfully finish the installation.
# Note: this may not be necessary for some local systems, but it is
# for our CI providers: `gh-actions` and travis, which will
# for our CI provider: `gh-actions`, which will
# fail trying to download the `jquery-ui` package
env['XDG_CACHE_HOME'] = join(self.get_build_dir(arch), 'p4a_files')
# we make use of the same directory than `XDG_CACHE_HOME`, for our
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pythonpackage.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
THESE TESTS DON'T RUN IN TRAVIS (takes too long!!)
THESE TESTS DON'T RUN IN GITHUB-ACTIONS (takes too long!!)
ONLY THE BASIC ONES IN test_pythonpackage_basic.py DO.
(This file basically covers all tests for any of the
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pythonpackage_basic.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
ONLY BASIC TEST SET. The additional ones are in test_pythonpackage.py.
These are in a separate file because these were picked to run in travis,
These are in a separate file because these were picked to run in github-actions,
while the other additional ones aren't (for build time reasons).
"""

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ deps =
# posargs will be replaced by the tox args, so you can override pytest
# args e.g. `tox -- tests/test_graph.py`
commands = pytest {posargs:tests/}
passenv = TRAVIS TRAVIS_*
passenv = GITHUB_*
setenv =
PYTHONPATH={toxinidir}

Expand Down

0 comments on commit 1d8f773

Please sign in to comment.