From bb002e662adc9b808585ce68b533196942b88b85 Mon Sep 17 00:00:00 2001 From: liangliang Date: Tue, 8 Jun 2021 15:45:41 +0800 Subject: [PATCH] remove travis --- .github/workflows/django.yml | 6 +++++- .travis.yml | 38 ---------------------------------- travis_test/__init__.py | 0 travis_test/mysql.cnf | 9 -------- travis_test/travis_settings.py | 19 ----------------- 5 files changed, 5 insertions(+), 67 deletions(-) delete mode 100644 .travis.yml delete mode 100644 travis_test/__init__.py delete mode 100644 travis_test/mysql.cnf delete mode 100644 travis_test/travis_settings.py diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index afa3c0e..6997c10 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -66,4 +66,8 @@ jobs: run: | python manage.py makemigrations python manage.py migrate - python manage.py test + coverage run manage.py test + coverage xml + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d695c46..0000000 --- a/.travis.yml +++ /dev/null @@ -1,38 +0,0 @@ -dist: xenial -language: python -sudo: required -python: - - "3.6" - - "3.7" - - "3.8" - -services: - - mysql -env: - global: - - DJANGO_SETTINGS_MODULE="travis_test.travis_settings" -branches: - only: - - master -# command to install dependencies -before_install: - - sudo apt-get update - - sudo apt-get install python-dev python3-dev libmysqlclient-dev -y - - sudo cp $TRAVIS_BUILD_DIR/travis_test/mysql.cnf /etc/mysql/conf.d/ - - sudo service mysql restart -install: - - pip install -r requirements.txt - - pip install python-coveralls - - pip install coverage codecov -before_script: - - mysql -e 'CREATE DATABASE `djangoblog` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */;' - - python manage.py makemigrations - - python manage.py migrate - - python manage.py collectstatic --noinput - - python manage.py compress --force -# command to run tests -script: - - coverage run manage.py test -after_success: - - coveralls - - codecov \ No newline at end of file diff --git a/travis_test/__init__.py b/travis_test/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/travis_test/mysql.cnf b/travis_test/mysql.cnf deleted file mode 100644 index e6f1645..0000000 --- a/travis_test/mysql.cnf +++ /dev/null @@ -1,9 +0,0 @@ -[mysqld] -character-set-server=utf8mb4 -collation-server=utf8mb4_unicode_ci - -[client] -default-character-set = utf8mb4 - -[mysql] -default-character-set = utf8mb4 \ No newline at end of file diff --git a/travis_test/travis_settings.py b/travis_test/travis_settings.py deleted file mode 100644 index b008fa4..0000000 --- a/travis_test/travis_settings.py +++ /dev/null @@ -1,19 +0,0 @@ -from DjangoBlog.settings import * - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.mysql', - 'NAME': 'djangoblog', - 'USER': 'travis', - 'PASSWORD': '', - 'HOST': '127.0.0.1', - 'PORT': 3306, - } -} - -CACHES = { - 'default': { - 'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache', - 'LOCATION': 'django_cache', - } -}