Skip to content

Commit 96c9951

Browse files
committed
ci: move remaining travis to github actions, remove travis
Travis is shutting down or something similar in a few weeks. Currently the following jobs are run on travis: - Testing for Linux - Coverage reporting - Deploy - IRC notifications Other than the IRC, which I don't think github actions supports, and don't know if still desirable, this moves everything to github actions and deletes the travis file.
1 parent 39bac1f commit 96c9951

File tree

5 files changed

+90
-107
lines changed

5 files changed

+90
-107
lines changed

.github/workflows/main.yml

Lines changed: 73 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,12 @@ jobs:
2424
"windows-py37",
2525
"windows-pypy3",
2626

27-
# Eventually should convert travis to Github Actions as well.
28-
# Commented stuff is in preparation for that.
29-
# "ubuntu-py35",
30-
# "ubuntu-py36",
31-
# "ubuntu-py36-pytestmain",
32-
# "ubuntu-py37",
33-
# "ubuntu-py38",
34-
# "ubuntu-pypy3",
27+
"ubuntu-py35",
28+
"ubuntu-py36",
29+
"ubuntu-py36-pytestmain",
30+
"ubuntu-py37",
31+
"ubuntu-py38",
32+
"ubuntu-pypy3",
3533
"ubuntu-benchmark",
3634

3735
"linting",
@@ -55,30 +53,36 @@ jobs:
5553
python: "pypy3"
5654
os: windows-latest
5755
tox_env: "pypy3"
58-
# - name: "ubuntu-py35"
59-
# python: "3.5"
60-
# os: ubuntu-latest
61-
# tox_env: "py35"
62-
# - name: "ubuntu-py36"
63-
# python: "3.6"
64-
# os: ubuntu-latest
65-
# tox_env: "py36"
66-
# - name: "ubuntu-py36-pytestmain"
67-
# python: "3.6"
68-
# os: ubuntu-latest
69-
# tox_env: "py36-pytestmain"
70-
# - name: "ubuntu-py37"
71-
# python: "3.7"
72-
# os: ubuntu-latest
73-
# tox_env: "py37"
74-
# - name: "ubuntu-py38"
75-
# python: "3.8"
76-
# os: ubuntu-latest
77-
# tox_env: "py38"
78-
# - name: "ubuntu-pypy3"
79-
# python: "pypy3"
80-
# os: ubuntu-latest
81-
# tox_env: "pypy3"
56+
- name: "ubuntu-py35"
57+
python: "3.5"
58+
os: ubuntu-latest
59+
tox_env: "py35"
60+
use_coverage: true
61+
- name: "ubuntu-py36"
62+
python: "3.6"
63+
os: ubuntu-latest
64+
tox_env: "py36"
65+
use_coverage: true
66+
- name: "ubuntu-py36-pytestmain"
67+
python: "3.6"
68+
os: ubuntu-latest
69+
tox_env: "py36-pytestmain"
70+
use_coverage: true
71+
- name: "ubuntu-py37"
72+
python: "3.7"
73+
os: ubuntu-latest
74+
tox_env: "py37"
75+
use_coverage: true
76+
- name: "ubuntu-py38"
77+
python: "3.8"
78+
os: ubuntu-latest
79+
tox_env: "py38"
80+
use_coverage: true
81+
- name: "ubuntu-pypy3"
82+
python: "pypy3"
83+
os: ubuntu-latest
84+
tox_env: "pypy3"
85+
use_coverage: true
8286
- name: "ubuntu-benchmark"
8387
python: "3.8"
8488
os: ubuntu-latest
@@ -104,17 +108,46 @@ jobs:
104108

105109
- name: Install dependencies
106110
run: |
107-
python -m pip install --upgrade pip
111+
python -m pip install --upgrade pip setuptools
108112
python -m pip install tox coverage
109113
110114
- name: Test without coverage
111115
if: "! matrix.use_coverage"
112116
run: "tox -e ${{ matrix.tox_env }}"
113117

114-
# - name: Test with coverage
115-
# if: "matrix.use_coverage"
116-
# env:
117-
# _PYTEST_TOX_COVERAGE_RUN: "coverage run -m"
118-
# COVERAGE_PROCESS_START: ".coveragerc"
119-
# _PYTEST_TOX_EXTRA_DEP: "coverage-enable-subprocess"
120-
# run: "tox -e ${{ matrix.tox_env }}"
118+
- name: Test with coverage
119+
if: "matrix.use_coverage"
120+
run: "tox -e ${{ matrix.tox_env }}-coverage"
121+
122+
- name: Upload coverage
123+
if: matrix.use_coverage && github.repository == 'pytest-dev/pluggy'
124+
env:
125+
CODECOV_NAME: ${{ matrix.name }}
126+
run: bash scripts/upload-coverage.sh -F GHA,${{ runner.os }}
127+
128+
deploy:
129+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'pytest-dev/pluggy'
130+
runs-on: ubuntu-latest
131+
132+
steps:
133+
- uses: actions/checkout@v2
134+
with:
135+
fetch-depth: 0
136+
137+
- uses: actions/setup-python@v2
138+
with:
139+
python-version: "3.8"
140+
141+
- name: Install dependencies
142+
run: |
143+
python -m pip install --upgrade pip
144+
pip install --upgrade wheel setuptools setuptools_scm
145+
146+
- name: Build package
147+
run: python setup.py sdist bdist_wheel
148+
149+
- name: Publish package
150+
uses: pypa/[email protected]
151+
with:
152+
user: __token__
153+
password: ${{ secrets.pypi_token }}

.travis.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

README.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pluggy - A minimalist production ready plugin system
33
====================================================
44

5-
|pypi| |conda-forge| |versions| |github-actions| |travis| |gitter| |black| |codecov|
5+
|pypi| |conda-forge| |versions| |github-actions| |gitter| |black| |codecov|
66

77
This is the core framework used by the `pytest`_, `tox`_, and `devpi`_ projects.
88

@@ -80,9 +80,6 @@ Running this directly gets us::
8080
.. |github-actions| image:: https://github.com/pytest-dev/pluggy/workflows/main/badge.svg
8181
:target: https://github.com/pytest-dev/pluggy/actions
8282

83-
.. |travis| image:: https://img.shields.io/travis/pytest-dev/pluggy/master.svg
84-
:target: https://travis-ci.org/pytest-dev/pluggy
85-
8683
.. |conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/pluggy.svg
8784
:target: https://anaconda.org/conda-forge/pytest
8885

docs/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
"github_button": "true",
4848
"github_banner": "true",
4949
"github_type": "star",
50-
"travis_button": "true",
5150
"badge_branch": "master",
5251
"page_width": "1080px",
5352
"fixed_sidebar": "false",

scripts/upload-coverage.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
set -x
5+
6+
if [ -z "$TOXENV" ]; then
7+
python -m pip install coverage
8+
else
9+
# Add last TOXENV to $PATH.
10+
PATH="$PWD/.tox/${TOXENV##*,}/bin:$PATH"
11+
fi
12+
13+
python -m coverage xml
14+
# Set --connect-timeout to work around https://github.com/curl/curl/issues/4461
15+
curl -S -L --connect-timeout 5 --retry 6 -s https://codecov.io/bash -o codecov-upload.sh
16+
bash codecov-upload.sh -Z -X fix -f coverage.xml "$@"

0 commit comments

Comments
 (0)