diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..de13472 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,57 @@ +name: Test + +on: [push, pull_request] + +env: + FORCE_COLOR: 1 + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10-dev", "pypy3"] + os: [ubuntu-latest] + include: + - { python-version: "3.7", os: macos-latest } + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache + uses: actions/cache@v2 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: + ${{ matrix.os }}-${{ matrix.python-version }}-v1-${{ + hashFiles('**/setup.py') }} + restore-keys: | + ${{ matrix.os }}-${{ matrix.python-version }}-v1- + + - name: Install dependencies + run: | + python -m pip install -U pip + python -m pip install -U setuptools virtualenv + python -m pip install -U --requirement=requirements-travis.txt + python -m pip install . + + - name: Tests + run: | + make check + make test + + - name: Upload coverage + uses: codecov/codecov-action@v1 + with: + name: ${{ matrix.os }} Python ${{ matrix.python-version }} diff --git a/.gitignore b/.gitignore index 5b05249..3733a50 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.pyc .coverage .coverage.* +.tox __pycache__/ dist/*.tar.gz dist/*.zip diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 42d644d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: python -cache: pip -matrix: - include: - - os: osx - language: generic - - python: pypy - - python: 2.7 - - python: 3.5 - - python: 3.6 - - python: 3.7 - - python: 3.8 - - python: 3.9 -install: - - scripts/travis.sh pip install --upgrade setuptools - - scripts/travis.sh pip install --upgrade --requirement=requirements-travis.txt - - scripts/travis.sh LC_ALL=C pip install . -script: - - scripts/travis.sh make check - - scripts/travis.sh make test -after_success: - - scripts/travis.sh coveralls -branches: - except: - - /^[0-9]/