diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..36bb458 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,31 @@ +name: Run tests + +on: + push: + branches: ['master'] + pull_request: + +jobs: + setup: + runs-on: ubuntu-latest + outputs: + strategy: ${{steps.load.outputs.strategy}} + + steps: + - uses: actions/checkout@v2 + with: + repository: colcon/ci + - id: load + run: echo "::set-output name=strategy::$(echo $(cat strategy.json))" + + pytest: + needs: [setup] + strategy: ${{fromJson(needs.setup.outputs.strategy)}} + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{matrix.python}} + - uses: colcon/ci@v1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4a8724f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: python -python: "3.5" -dist: trusty -sudo: true -install: - - pip install -U setuptools - # install_requires - - pip install -U git+https://github.com/colcon/colcon-core - - pip install -U git+https://github.com/colcon/colcon-library-path - # tests_require - - pip install -U flake8-blind-except flake8-builtins flake8-class-newline flake8-comprehensions flake8-deprecated flake8-docstrings flake8-import-order flake8-quotes pep8-naming pylint pytest pytest-cov scspell3k -script: - # invoke pytest - - python -m pytest --cov=colcon_cmake --cov-branch -notifications: - email: false diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index ae47c3a..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,15 +0,0 @@ -version: '{build}' -environment: - matrix: - - PYTHON: "C:\\Python36-x64" -install: - - "%PYTHON%\\python.exe -m pip install -U setuptools" - # install_requires - - "%PYTHON%\\python.exe -m pip install -U git+https://github.com/colcon/colcon-core" - - "%PYTHON%\\python.exe -m pip install -U git+https://github.com/colcon/colcon-library-path" - # tests_require - - "%PYTHON%\\python.exe -m pip install -U flake8-blind-except flake8-builtins flake8-class-newline flake8-comprehensions flake8-deprecated flake8-import-order flake8-docstrings flake8-quotes pep8-naming pylint pytest pytest-cov scspell3k" -build: off -test_script: - # invoke pytest - - "%PYTHON%\\python.exe -m pytest --cov=colcon_cmake --cov-branch" diff --git a/setup.cfg b/setup.cfg index dcd7c34..582b750 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,7 +31,10 @@ install_requires = colcon-library-path colcon-test-result>=0.3.3 packages = find: -tests_require = +zip_safe = true + +[options.extras_require] +test = flake8>=3.6.0 flake8-blind-except flake8-builtins @@ -46,13 +49,14 @@ tests_require = pytest pytest-cov scspell3k>=2.2 -zip_safe = true [tool:pytest] filterwarnings = error - # Suppress deprecation warning in flake8 + # Suppress deprecation warnings in other packages + ignore:lib2to3 package is deprecated::scspell ignore:SelectableGroups dict interface is deprecated::flake8 + ignore:Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated::pyreadline junit_suite_name = colcon-cmake [options.entry_points] @@ -77,3 +81,6 @@ colcon_test_result.test_result = [flake8] import-order-style = google + +[coverage:run] +source = colcon_cmake