Skip to content

Commit ee9ee49

Browse files
authored
Use GitHub Actions instead of Travis and AppVeyor (#48)
* Use extras_require[test] instead of tests_require * Update list of deprecations to ignore in other packages * Move a noqa suppression for better compatibility * Switch from Travis and AppVeyor to GitHub Actions
1 parent af88dbc commit ee9ee49

File tree

5 files changed

+44
-33
lines changed

5 files changed

+44
-33
lines changed

.github/workflows/ci.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Run tests
2+
3+
on:
4+
push:
5+
branches: ['master']
6+
pull_request:
7+
8+
jobs:
9+
setup:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
strategy: ${{steps.load.outputs.strategy}}
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
with:
17+
repository: colcon/ci
18+
- id: load
19+
run: echo "::set-output name=strategy::$(echo $(cat strategy.json))"
20+
21+
pytest:
22+
needs: [setup]
23+
strategy: ${{fromJson(needs.setup.outputs.strategy)}}
24+
runs-on: ${{matrix.os}}
25+
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: actions/setup-python@v2
29+
with:
30+
python-version: ${{matrix.python}}
31+
- uses: colcon/ci@v1

.travis.yml

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

appveyor.yml

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

colcon_python_setup_py/package_augmentation/python_setup_py.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ def __init__(self): # noqa: D107
2323
PackageAugmentationExtensionPoint.EXTENSION_POINT_VERSION,
2424
'^1.0')
2525

26-
def augment_package(
26+
def augment_package( # noqa: D102
2727
self, desc, *, additional_argument_names=None
28-
): # noqa: D102
28+
):
2929
if desc.type != 'python':
3030
return
3131
if 'get_python_setup_options' in desc.metadata:

setup.cfg

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ install_requires =
2929
colcon-core>=0.6.1
3030
setuptools
3131
packages = find:
32-
tests_require =
32+
zip_safe = true
33+
34+
[options.extras_require]
35+
test =
3336
flake8>=3.6.0
3437
flake8-blind-except
3538
flake8-builtins
@@ -44,11 +47,14 @@ tests_require =
4447
pytest
4548
pytest-cov
4649
scspell3k>=2.2
47-
zip_safe = true
4850

4951
[tool:pytest]
5052
filterwarnings =
5153
error
54+
# Suppress deprecation warnings in other packages
55+
ignore:lib2to3 package is deprecated::scspell
56+
ignore:SelectableGroups dict interface is deprecated::flake8
57+
ignore:Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated::pyreadline
5258
junit_suite_name = colcon-python-setup-py
5359

5460
[options.entry_points]
@@ -59,3 +65,6 @@ colcon_core.package_identification =
5965

6066
[flake8]
6167
import-order-style = google
68+
69+
[coverage:run]
70+
source = colcon_python_setup_py

0 commit comments

Comments
 (0)