From 0856f4f76269f0848d12fff6cc8aa1b138c79fe0 Mon Sep 17 00:00:00 2001 From: Phivos Stylianides Date: Thu, 4 May 2023 22:45:18 +0200 Subject: [PATCH] Migrate CI to github actions (#163) * Use github actions * Drop py 2.7 and 3.5 * Pin ubuntu image version to ubuntu-20.04 * Replace status badge * Delete travis file --- .github/workflows/ci.yml | 90 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 55 ------------------------ README.md | 2 +- 3 files changed, 91 insertions(+), 56 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 0000000..2802c19 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,90 @@ +name: CI + +on: + push: + branches: ['master', 'ci'] + pull_request: + +jobs: + main: + strategy: + matrix: + include: + - python: '3.6' + tox_env: 'py36-dj111-drf37' + + - python: '3.6' + tox_env: 'py36-dj20-drf37' + + - python: '3.6' + tox_env: 'py36-dj21-drf37' + + - python: '3.6' + tox_env: 'py36-dj22-drf37' + + - python: '3.6' + tox_env: 'py36-dj111-drf39' + + - python: '3.6' + tox_env: 'py36-dj20-drf39' + + - python: '3.6' + tox_env: 'py36-dj21-drf39' + + - python: '3.6' + tox_env: 'py36-dj22-drf39' + + - python: '3.6' + tox_env: 'py36-dj30-drf310' + + - python: '3.7' + tox_env: 'py37-dj111-drf37' + + - python: '3.7' + tox_env: 'py37-dj20-drf37' + + - python: '3.7' + tox_env: 'py37-dj21-drf37' + + - python: '3.7' + tox_env: 'py37-dj22-drf37' + + - python: '3.7' + tox_env: 'py37-dj111-drf39' + + - python: '3.7' + tox_env: 'py37-dj20-drf39' + + - python: '3.7' + tox_env: 'py37-dj21-drf39' + + - python: '3.7' + tox_env: 'py37-dj22-drf39' + + - python: '3.7' + tox_env: 'py37-dj30-drf310' + + runs-on: ubuntu-20.04 + name: Python ${{ matrix.python }} with packages ${{ matrix.tox_env }} + steps: + - uses: actions/checkout@v3 + + - name: set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + + - name: install dependencies + run: python -m pip install "tox~=3.22.0" "coverage<4" "setuptools<40.0.0" + + - name: run test suite + env: + TOX_ENV: ${{ matrix.tox_env }} + run: tox -ve $TOX_ENV + + - name: run coverage + env: + TOX_ENV: ${{ matrix.tox_env }} + run: | + python -m pip install codecov + codecov -e TOX_ENV diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3e4932b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,55 +0,0 @@ -dist: xenial # required for Python >= 3.7 -language: python - -sudo: false - -matrix: - fast_finish: true - include: - - python: 2.7 - env: - - TOX_ENV=py27-dj19-drf33 - - TOX_ENV=py27-dj110-drf33 - - TOX_ENV=py27-dj111-drf37 - - python: 3.5 - env: - - TOX_ENV=py35-dj111-drf37 - - TOX_ENV=py35-dj20-drf37 - - TOX_ENV=py35-dj21-drf37 - - TOX_ENV=py35-dj22-drf37 - - TOX_ENV=py35-dj111-drf39 - - TOX_ENV=py35-dj20-drf39 - - TOX_ENV=py35-dj21-drf39 - - TOX_ENV=py35-dj22-drf39 - - python: 3.6 - env: - - TOX_ENV=py36-dj111-drf37 - - TOX_ENV=py36-dj20-drf37 - - TOX_ENV=py36-dj21-drf37 - - TOX_ENV=py36-dj22-drf37 - - TOX_ENV=py36-dj111-drf39 - - TOX_ENV=py36-dj20-drf39 - - TOX_ENV=py36-dj21-drf39 - - TOX_ENV=py36-dj22-drf39 - - TOX_ENV=py36-dj30-drf310 - - python: 3.7 - env: - - TOX_ENV=py37-dj111-drf37 - - TOX_ENV=py37-dj20-drf37 - - TOX_ENV=py37-dj21-drf37 - - TOX_ENV=py37-dj22-drf37 - - TOX_ENV=py37-dj111-drf39 - - TOX_ENV=py37-dj20-drf39 - - TOX_ENV=py37-dj21-drf39 - - TOX_ENV=py37-dj22-drf39 - - TOX_ENV=py37-dj30-drf310 - -install: - - travis_retry pip install "tox~=3.22.0" "coverage<4" "setuptools<40.0.0" - -script: - - tox -ve $TOX_ENV - -after_success: - - pip install codecov - - codecov -e TOX_ENV diff --git a/README.md b/README.md index 6ffef60..f50ae3d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![Latest Version](https://img.shields.io/pypi/v/django_mock_queries.svg)](https://pypi.python.org/pypi/django_mock_queries) -[![Build Status](https://travis-ci.org/stphivos/django-mock-queries.svg?branch=master)](https://travis-ci.org/stphivos/django-mock-queries) +[![Build Status](https://github.com/stphivos/django-mock-queries/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stphivos/django-mock-queries/actions/workflows/ci.yml) [![Code Coverage](https://codecov.io/github/stphivos/django-mock-queries/coverage.svg?branch=master)](https://codecov.io/github/stphivos/django-mock-queries?branch=master) [![Code Climate](https://codeclimate.com/github/stphivos/django-mock-queries/badges/gpa.svg)](https://codeclimate.com/github/stphivos/django-mock-queries)