-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #490 from nose-devs/use-github-actions
Switch to GitHub Actions for CI builds; get builds passing
- Loading branch information
Showing
9 changed files
with
102 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
[run] | ||
branch = True | ||
source = nose2 | ||
omit = nose2/tests/* | ||
include = nose2/* | ||
omit = nose2/*/tests/* | ||
nose2/tests/* | ||
test_*.* | ||
__init__.py | ||
|
||
[report] | ||
show_missing = True | ||
skip_covered = True | ||
exclude_lines = pragma: no cover | ||
raise NotImplementedError | ||
include = nose2/* | ||
omit = nose2/tests/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: build | ||
on: | ||
push: | ||
pull_request: | ||
# build weekly at 4:00 AM UTC | ||
schedule: | ||
- cron: '0 4 * * 1' | ||
jobs: | ||
# this job ensures that tests can run from the packaged version, which means | ||
# that nose2 is correctly packaging and distributing its tests | ||
test-sdist: | ||
name: run tests from packaged source | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: test | ||
run: | | ||
python setup.py sdist | ||
version="$(cat nose2/_version.py | grep '^__version__' | cut -d "'" -f2)" | ||
cd dist | ||
tar -xzf "nose2-${version}.tar.gz" | ||
cd "nose2-${version}" | ||
pip install -e '.[dev]' | ||
nose2 -v --pretty-assert | ||
test: | ||
strategy: | ||
matrix: | ||
# for the matrix, macos and linux on | ||
# - py2 | ||
# - the lowest supported py3 | ||
# - the highest supported py3 | ||
# | ||
# any additional builds for windows and other python versions are | ||
# handled via `include` to avoid an over-large test matrix | ||
os: [ubuntu-latest, macos-latest] | ||
python-version: [2.7, 3.5, 3.9] | ||
include: | ||
- os: ubuntu-latest | ||
python-version: 3.6 | ||
- os: ubuntu-latest | ||
python-version: 3.7 | ||
- os: ubuntu-latest | ||
python-version: 3.8 | ||
- os: ubuntu-latest | ||
python-version: pypy-2.7 | ||
- os: ubuntu-latest | ||
python-version: pypy-3.7 | ||
# FIXME: windows builds fail and must therefore be included with | ||
# `ignore-failures: true` which we pass for `continue-on-error` below | ||
- os: windows-latest | ||
python-version: 2.7 | ||
- os: windows-latest | ||
python-version: 3.9 | ||
name: "python=${{ matrix.python-version }} os=${{ matrix.os }}" | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: install tox | ||
run: python -m pip install -U tox | ||
- name: test | ||
run: python -m tox -e py | ||
# ignore errors in windows builds (for now) | ||
continue-on-error: ${{ matrix.os == 'windows-latest' }} | ||
- name: ensure docs build | ||
# docs are only ever built on a linux py3 box (readthedocs) | ||
if: ${{ matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest' }} | ||
run: python -m tox -e docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# use a requirements file to specify to readthedocs that doc builds need the | ||
# "doc" extra | ||
-e .[doc] | ||
# "dev" extra | ||
-e .[dev] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,16 @@ | ||
[tox] | ||
envlist=py27,py34,py35,py36,py37,pypy,jython,docs,pypy3 | ||
envlist=py27,py35,py36,py37,pypy,pypy3,docs,lint | ||
|
||
# Default settings for py27, py34 and pypy | ||
[testenv] | ||
install_command=pip install . {packages} | ||
depts=coverage | ||
setenv=PYTHONPATH={toxinidir} | ||
commands=coverage erase | ||
coverage run -m nose2.__main__ -v --pretty-assert | ||
coverage report --include=*nose2* --omit=*nose2/tests* | ||
coverage html -d cover --include=*nose2* --omit=*nose2/tests* | ||
|
||
[testenv:jython] | ||
deps=-r{toxinidir}/requirements.txt | ||
-r{toxinidir}/requirements-2.7.txt | ||
commands=unit2 discover [] | ||
extras = dev | ||
setenv = PYTHONPATH={toxinidir} | ||
commands = | ||
coverage erase | ||
coverage run nose2 -v --pretty-assert | ||
coverage report | ||
|
||
[testenv:docs] | ||
basepython=python2.7 | ||
extras = doc | ||
extras = dev | ||
changedir=docs | ||
commands=sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html |
This file was deleted.
Oops, something went wrong.