From f07ae6757cb2b4e9870e8751b71fc11844c25c48 Mon Sep 17 00:00:00 2001 From: Dylan Verheul Date: Sat, 31 Oct 2020 07:26:40 +0100 Subject: [PATCH] Switch CI to GitHub Actions (#237) --- .github/workflows/ci.yml | 66 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 30 ------------------ README.md | 4 +-- 3 files changed, 68 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..c26acc0c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,66 @@ +name: CI + +on: [push] + +jobs: + + test: + name: Python ${{ matrix.python-version }} + runs-on: ubuntu-latest + + strategy: + max-parallel: 5 + matrix: + python-version: [3.6, 3.7, 3.8, 3.9] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install GDAL binaries + run: | + sudo apt-get install binutils libproj-dev gdal-bin + + - run: pip install -U pip + - run: pip install -U poetry tox coverage + + - name: Test with tox + run: tox -e py + + - name: Upload coverage + uses: actions/upload-artifact@v2 + with: + name: coverage${{ matrix.group }} + path: .coverage* + + coverage: + needs: test + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - run: pip install -U pip + - run: pip install -U poetry tox coverage coveralls + + - name: Download coverage + uses: actions/download-artifact@v2 + + - name: Combine coverage + run: coverage combine coverage*/.coverage* + + - name: Coveralls + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: python -m coveralls \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1e1d005e..00000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -dist: bionic - -language: python - -python: - - "3.6" - - "3.7" - - "3.8" - - "3.9-dev" - -addons: - apt: - packages: - - postgresql-11 - - postgresql-11-postgis-2.5 - - postgresql-11-postgis-2.5-scripts - postgresql: "11" - -services: postgresql - -before_install: pip install poetry - -install: pip install tox-travis coveralls - -script: - - tox - -after_success: - - coverage combine - - coveralls diff --git a/README.md b/README.md index 896ad003..43a98aa3 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # django-bootstrap 4 -[![image](https://travis-ci.org/zostera/django-bootstrap4.svg?branch=main)](https://travis-ci.org/zostera/django-bootstrap4) -[![image](https://coveralls.io/repos/github/zostera/django-bootstrap4/badge.svg?branch=main)](https://coveralls.io/github/zostera/django-bootstrap4?branch=main) +[![CI](https://github.com/zostera/django-bootstrap4/workflows/CI/badge.svg?branch=main)](https://github.com/zostera/django-bootstrap4/actions?workflow=CI) +[![Coverage Status](https://coveralls.io/repos/github/zostera/django-bootstrap4/badge.svg?branch=main)](https://coveralls.io/github/zostera/django-bootstrap4?branch=main) [![Latest PyPI version](https://img.shields.io/pypi/v/django-bootstrap4.svg)](https://pypi.python.org/pypi/django-bootstrap4) [![Any color you like](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)