Start using GitHub Actions and remove Travis
This commit is contained in:
1 parent
50294a213b
commit
321b41ddd0
6 files changed
+61
-75
No files matched your search
@@ -0,0 +1,47 @@
|
||||
name: CI Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
postgres:
|
||||
image: postgres
|
||||
env:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
ports:
|
||||
- 5432:5432
|
||||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
env:
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
||||
ports:
|
||||
- 3306:3306
|
||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ['2.7', '3.5', '3.6', '3.7', '3.8']
|
||||
|
||||
name: Build with Python ${{ matrix.python-version }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
# Fetch all tags and branches because tests rely on it
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: python -m pip install tox tox-gh-actions
|
||||
- name: Test with tox ${{ matrix.python-version }}
|
||||
run: tox
|
||||
-71
@@ -1,71 +0,0 @@
|
||||
language: python
|
||||
os: linux
|
||||
dist: xenial
|
||||
services:
|
||||
- mysql
|
||||
- postgresql
|
||||
|
||||
git:
|
||||
depth: false
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- python: 2.7
|
||||
env: TOXENV=py27-django111
|
||||
|
||||
- python: 3.5
|
||||
env: TOXENV=py35-django111
|
||||
- python: 3.5
|
||||
env: TOXENV=py35-django20
|
||||
- python: 3.5
|
||||
env: TOXENV=py35-django21
|
||||
- python: 3.5
|
||||
env: TOXENV=py35-django22
|
||||
|
||||
- python: 3.6
|
||||
env: TOXENV=py36-django111
|
||||
- python: 3.6
|
||||
env: TOXENV=py36-django20
|
||||
- python: 3.6
|
||||
env: TOXENV=py36-django21
|
||||
- python: 3.6
|
||||
env: TOXENV=py36-django22
|
||||
- python: 3.6
|
||||
env: TOXENV=py36-django30
|
||||
- python: 3.6
|
||||
env: TOXENV=py36-django31
|
||||
|
||||
- python: 3.7
|
||||
env: TOXENV=py37-django111
|
||||
- python: 3.7
|
||||
env: TOXENV=py37-django20
|
||||
- python: 3.7
|
||||
env: TOXENV=py37-django21
|
||||
- python: 3.7
|
||||
env: TOXENV=py37-django22
|
||||
- python: 3.7
|
||||
env: TOXENV=py37-django30
|
||||
- python: 3.7
|
||||
env: TOXENV=py37-django31
|
||||
|
||||
- python: 3.8
|
||||
env: TOXENV=py38-django111
|
||||
- python: 3.8
|
||||
env: TOXENV=py38-django20
|
||||
- python: 3.8
|
||||
env: TOXENV=py38-django21
|
||||
- python: 3.8
|
||||
env: TOXENV=py38-django22
|
||||
- python: 3.8
|
||||
env: TOXENV=py38-django30
|
||||
- python: 3.8
|
||||
env: TOXENV=py38-django31
|
||||
|
||||
- python: 3.6
|
||||
env: TOXENV=lint
|
||||
|
||||
install:
|
||||
- pip install tox
|
||||
|
||||
script:
|
||||
- tox
|
||||
@@ -3,7 +3,7 @@
|
||||
Detect backward incompatible migrations for your Django project.
|
||||
It will save you time by making sure migrations will not break with a older codebase.
|
||||
|
||||
[](https://travis-ci.org/3YOURMIND/django-migration-linter)
|
||||
[](https://actions-badge.atrox.dev/3YOURMIND/django-migration-linter/goto?ref=master)
|
||||
[](https://pypi.python.org/pypi/django-migration-linter/)
|
||||
[](https://github.com/3YOURMIND/django-migration-linter/pulls)
|
||||
[](https://www.3yourmind.com/career)
|
||||
|
||||
@@ -6,9 +6,9 @@ You will need to install the test requirements, which can be found in the ``setu
|
||||
A good way to get started is to install the development version of the linter by doing ``pip install -e .[test]``.
|
||||
|
||||
To be able to fully test the linter, you will need both MySQL and PostgreSQL databases running.
|
||||
You can either tweak the ``tests/test_project/settings.py`` file to get your DB settings right, or to have databases and users corresponding to the default Travis users.
|
||||
You can either tweak the ``tests/test_project/settings.py`` file to get your DB settings right, or to have databases and users corresponding to the default CI users.
|
||||
|
||||
## Database setup
|
||||
|
||||
By default, the test Django project in the repository has multiple databases configured in order to make the Travis tests work.
|
||||
By default, the test Django project in the repository has multiple databases configured in order to make the CI tests work.
|
||||
Do not hesitate to modify [the configured test databases](../../tests/test_project/settings.py).
|
||||
@@ -104,12 +104,14 @@ DATABASES = {
|
||||
"ENGINE": "django.db.backends.postgresql",
|
||||
"NAME": "django_migration_linter_test_project",
|
||||
"USER": "postgres",
|
||||
"PASSWORD": "postgres",
|
||||
"HOST": "127.0.0.1",
|
||||
"TEST": {"DEPENDENCIES": []},
|
||||
},
|
||||
"mysql": {
|
||||
"ENGINE": "django.db.backends.mysql",
|
||||
"NAME": "django_migration_linter_test_project",
|
||||
"USER": "travis",
|
||||
"USER": "root",
|
||||
"PASSWORD": "",
|
||||
"HOST": "127.0.0.1",
|
||||
"TEST": {"DEPENDENCIES": []},
|
||||
|
||||
Reference in new issue
Block a user