diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 32f5a7f6..00000000 --- a/.coveragerc +++ /dev/null @@ -1,10 +0,0 @@ -[run] -omit = - toolz/tests/test* - toolz/*/tests/test* - toolz/compatibility.py - toolz/_version.py - -[report] -exclude_lines = - pragma: no cover diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..9ddbf3ff --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,42 @@ +name: Test + +on: + push: + branches: [ master ] + pull_request: + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ["ubuntu-latest"] + python-version: [3.5, 3.6, 3.7, 3.8, 3.9, "pypy-3.6", "pypy-3.7"] + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools wheel + pip install coverage pep8 pytest + pip install -e . + - name: PyTest + run: | + coverage run -m pytest --doctest-modules toolz/ + pytest bench/ + pep8 --ignore="E731,W503,E402" --exclude=conf.py,tests,examples,bench -r --show-source . + + finish: + needs: test + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.github_token }} + parallel-finished: true diff --git a/.gitignore b/.gitignore index cfef783b..bf4aebed 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,6 @@ dist/ *.egg-info/ bench/shakespeare.txt .coverage - +*.sw? +.DS_STORE \.tox/ diff --git a/setup.cfg b/setup.cfg index 23cd1816..40974348 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,3 +5,15 @@ versionfile_source = toolz/_version.py versionfile_build = toolz/_version.py tag_prefix = parentdir_prefix = toolz- + +[coverage:run] +source = toolz +omit = + toolz/tests/test* + toolz/*/tests/test* + toolz/compatibility.py + toolz/_version.py + +[coverage:report] +exclude_lines = + pragma: no cover