Skip to content

Commit db5d7c9

Browse files
committed
Replace Travis CI with GitHub Actions
1 parent ec344d8 commit db5d7c9

File tree

10 files changed

+164
-159
lines changed

10 files changed

+164
-159
lines changed

.github/workflows/examples.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Examples
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
env:
6+
FORCE_COLOR: 1
7+
8+
jobs:
9+
examples:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
target: [
15+
"src-layout",
16+
"adhoc-layout",
17+
]
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: 3.9
26+
27+
- name: Cache
28+
uses: actions/cache@v2
29+
with:
30+
path: ~/.cache/pip
31+
key:
32+
examples-v1-${{ hashFiles('**/tox.ini') }}
33+
restore-keys: |
34+
examples-v1-
35+
36+
- name: Install dependencies
37+
run: |
38+
python -m pip install -U pip
39+
python -m pip install -U wheel
40+
python -m pip install --progress-bar=off tox -rci/requirements.txt
41+
42+
- name: Examples
43+
run: |
44+
cd examples/${{ matrix.target }}
45+
tox -v

.github/workflows/lint.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Lint
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
env:
6+
FORCE_COLOR: 1
7+
8+
jobs:
9+
lint:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
toxenv: ["check", "docs"]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: 3.9
23+
24+
- name: Cache
25+
uses: actions/cache@v2
26+
with:
27+
path: ~/.cache/pip
28+
key:
29+
lint-v1-${{ hashFiles('**/tox.ini') }}
30+
restore-keys: |
31+
lint-v1-
32+
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install -U pip
36+
python -m pip install -U wheel
37+
python -m pip install --progress-bar=off tox -rci/requirements.txt
38+
39+
- name: Lint ${{ matrix.toxenv }}
40+
run: |
41+
tox -v -e ${{ matrix.toxenv }}

.github/workflows/test.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Test
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
env:
6+
FORCE_COLOR: 1
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
python-version: ["pypy3", "3.6", "3.7", "3.8", "3.9"]
15+
tox-extra-versions: [
16+
"pytest46-xdist133-coverage55",
17+
"pytest54-xdist133-coverage55",
18+
"pytest62-xdist202-coverage55",
19+
]
20+
include:
21+
# Add new helper variables to existing jobs
22+
- {python-version: "pypy3", tox-python-version: "pypy3"}
23+
- {python-version: "3.6", tox-python-version: "py36"}
24+
- {python-version: "3.7", tox-python-version: "py37"}
25+
- {python-version: "3.8", tox-python-version: "py38"}
26+
- {python-version: "3.9", tox-python-version: "py39"}
27+
# Add extra jobs to the matrix
28+
- {tox-extra-versions: "pytest46-xdist127", python-version: "pypy-2.7", tox-python-version: "pypy"}
29+
- {tox-extra-versions: "pytest46-xdist127", python-version: "pypy3", tox-python-version: "pypy3"}
30+
- {tox-extra-versions: "pytest46-xdist127", python-version: "2.7", tox-python-version: "py27"}
31+
- {tox-extra-versions: "pytest46-xdist127", python-version: "3.5", tox-python-version: "py35"}
32+
- {tox-extra-versions: "pytest46-xdist127", python-version: "3.6", tox-python-version: "py36"}
33+
- {tox-extra-versions: "pytest46-xdist127", python-version: "3.7", tox-python-version: "py37"}
34+
35+
steps:
36+
- uses: actions/checkout@v2
37+
38+
- name: Set up Python ${{ matrix.python-version }}
39+
uses: actions/setup-python@v2
40+
with:
41+
python-version: ${{ matrix.python-version }}
42+
43+
- name: Get pip cache dir
44+
id: pip-cache
45+
run: |
46+
echo "::set-output name=dir::$(pip cache dir)"
47+
48+
- name: Cache
49+
uses: actions/cache@v2
50+
with:
51+
path: ${{ steps.pip-cache.outputs.dir }}
52+
key:
53+
test-${{ matrix.python-version }}-v1-${{ hashFiles('**/requirements.txt') }}
54+
restore-keys: |
55+
test-${{ matrix.python-version }}-v1-
56+
57+
- name: Install dependencies
58+
run: |
59+
python -m pip install -U pip
60+
python -m pip install -U wheel
61+
python -m pip install --progress-bar=off tox -rci/requirements.txt
62+
virtualenv --version
63+
pip --version
64+
tox --version
65+
66+
- name: Tox tests
67+
run: |
68+
tox -v -e ${{ matrix.tox-python-version }}-${{ matrix.tox-extra-versions }}

.travis.yml

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

CONTRIBUTING.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ For merging, you should:
7373
3. Add a note to ``CHANGELOG.rst`` about the changes.
7474
4. Add yourself to ``AUTHORS.rst``.
7575

76-
.. [1] If you don't have all the necessary python versions available locally you can rely on Travis - it will
77-
`run the tests <https://travis-ci.com//github/pytest-dev/pytest-cov/pull_requests>`_
76+
.. [1] If you don't have all the necessary Python versions available locally you can rely on GitHub Actions - it will
77+
`run the tests <https://github.com/pytest-dev/pytest-cov/actions>`_
7878
for each change you add in the pull request.
7979
8080
It will be slower though ...

MANIFEST.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ prune examples/*/*/htmlcov
66
prune examples/adhoc-layout/*.egg-info
77
prune examples/src-layout/src/*.egg-info
88

9+
graft .github/workflows
910
graft src
1011
graft ci
1112
graft tests
@@ -21,6 +22,6 @@ include CONTRIBUTING.rst
2122
include LICENSE
2223
include README.rst
2324

24-
include tox.ini .travis.yml .appveyor.yml .readthedocs.yml .pre-commit-config.yaml
25+
include tox.ini .appveyor.yml .readthedocs.yml .pre-commit-config.yaml
2526

2627
global-exclude *.py[cod] __pycache__/* *.so *.dylib .coverage .coverage.*

README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Overview
1010
* - docs
1111
- |docs|
1212
* - tests
13-
- | |travis| |appveyor| |requires|
13+
- | |github-actions| |appveyor| |requires|
1414
* - package
1515
- | |version| |conda-forge| |wheel| |supported-versions| |supported-implementations|
1616
| |commits-since|
@@ -19,9 +19,9 @@ Overview
1919
:target: https://readthedocs.org/projects/pytest-cov
2020
:alt: Documentation Status
2121

22-
.. |travis| image:: https://api.travis-ci.com/pytest-dev/pytest-cov.svg?branch=master
23-
:alt: Travis-CI Build Status
24-
:target: https://travis-ci.com/github/pytest-dev/pytest-cov
22+
.. |github-actions| image:: https://github.com/pytest-dev/pytest-cov/actions/workflows/test.yml/badge.svg
23+
:alt: GitHub Actions Status
24+
:target: https://github.com/pytest-dev/pytest-cov/actions
2525

2626
.. |appveyor| image:: https://ci.appveyor.com/api/projects/status/github/pytest-dev/pytest-cov?branch=master&svg=true
2727
:alt: AppVeyor Build Status

ci/templates/.travis.yml

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

docs/releasing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The process for releasing should follow these steps:
1616
git push
1717
git push --tags
1818
#. Wait for `AppVeyor <https://ci.appveyor.com/project/pytestbot/pytest-cov>`_
19-
and `Travis <https://travis-ci.org/schlamar/pytest-cov>`_ to give the green builds.
19+
and `GitHub Actions <https://github.com/pytest-dev/pytest-cov/actions>`_ to give the green builds.
2020
#. Check that the docs on `ReadTheDocs <https://readthedocs.org/projects/pytest-cov>`_ are built.
2121
#. Make sure you have a clean checkout, run ``git status`` to verify.
2222
#. Manually clean temporary files (that are ignored and won't show up in ``git status``)::

docs/reporting.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ The final report option can also suppress printing to the terminal::
7171

7272
This mode can be especially useful on continuous integration servers, where a coverage file
7373
is needed for subsequent processing, but no local report needs to be viewed. For example,
74-
tests run on Travis-CI could produce a .coverage file for use with Coveralls.
74+
tests run on GitHub Actions could produce a .coverage file for use with Coveralls.

0 commit comments

Comments
 (0)