Skip to content

Commit

Permalink
Usage of GHA instead of Travis (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit9126 authored Dec 20, 2022
1 parent 6cd4db5 commit 4be0296
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 14 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI

on:
push:
pull_request:

jobs:
tests:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest

strategy:
matrix:
python-version:
- '3.7'
- '3.8'
- '3.9'
- '3.10'

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'setup.py'

- name: Install dependencies
run: |
pip install -U pip setuptools tox tox-py coverage
python setup.py install
- name: Run tox targets for ${{ matrix.python-version }}
run: |
tox --py current
coverage lcov
- name: Coveralls Parallel
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.python-version }}
parallel: true
path-to-lcov: './coverage.lcov'

finish:
needs: tests
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
path-to-lcov: './coverage.lcov'
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
Version 1.3.0
-------------

*In development*

* Usage of `tox` for tests
* Add GitHub Actions


Version 1.2.1
-------------

Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ def test_suite():
test_suite="setup.test_suite",
install_requires=[
"setuptools",
"protobuf",
"shapely",
"protobuf<4.20",
"shapely<2; python_version<'3.8'",
"shapely; python_version>='3.8'",
"future",
"pyclipper"
]
Expand Down
13 changes: 13 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[tox]
envlist = py37,py38,py39,py310

[tox:.package]
# Because of poetry
basepython = python3

[testenv]
deps =
pytest
pytest-cov
commands =
pytest --cov=mapbox_vector_tile

0 comments on commit 4be0296

Please sign in to comment.