summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmjith Ramanujam <amjith.r@gmail.com>2021-01-05 08:10:38 -0800
committerGitHub <noreply@github.com>2021-01-05 08:10:38 -0800
commita4a355de78f5e1a7c9c1a42e905a978d5aad33e8 (patch)
tree6128799e20ed313bd2daa8c636fc4a233cc4e040
parent4517f49efdcc167a672bce9fdb922bb7224ce5f5 (diff)
parent08d1533935a2658ef2f67148995d4135326f619c (diff)
Merge pull request #927 from dbcli/RW/github-actions-ci
Switch to GitHub Actions for CI
-rw-r--r--.github/workflows/ci.yml60
-rw-r--r--.travis.yml33
2 files changed, 60 insertions, 33 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..aad35d9
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,60 @@
+name: mycli
+
+on:
+ push:
+ branches-ignore:
+ - 'master'
+ paths-ignore:
+ - '**.md'
+
+jobs:
+ linux:
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ python-version: [3.6, 3.7, 3.8]
+
+ steps:
+
+ - uses: actions/checkout@v2
+
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python-version }}
+
+ - name: Start MySQL
+ run: |
+ sudo /etc/init.d/mysql start
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install -r requirements-dev.txt
+ pip install --no-cache-dir -e .
+
+ - name: Wait for MySQL connection
+ run: |
+ while ! mysqladmin ping --host=localhost --port=3306 --user=root --password=root --silent; do
+ sleep 5
+ done
+
+ - name: Pytest / behave
+ env:
+ PYTEST_PASSWORD: root
+ run: |
+ ./setup.py test --pytest-args="--cov-report= --cov=mycli"
+
+ - name: Lint
+ env:
+ GIT_BRANCH: ${{ github.ref }}
+ run: |
+ ./setup.py lint --branch="$GIT_BRANCH"
+
+ - name: Coverage
+ run: |
+ coverage combine
+ coverage report
+ codecov
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 182dea7..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-language: python
-python:
- - "3.6"
- - "3.7"
- - "3.8"
-
-matrix:
- include:
- - python: 3.7
- dist: xenial
- sudo: true
-
-install:
- - pip install -r requirements-dev.txt
- - pip install --no-cache-dir -e .
- - sudo rm -f /etc/mysql/conf.d/performance-schema.cnf
- - sudo service mysql restart
-
-script:
- - ./setup.py test --pytest-args="--cov-report= --cov=mycli"
- - coverage combine
- - coverage report
- - ./setup.py lint --branch=$TRAVIS_BRANCH
-
-after_success:
- - codecov
-
-notifications:
- webhooks:
- urls:
- - YOUR_WEBHOOK_URL
- on_success: change # options: [always|never|change] default: always
- on_failure: always # options: [always|never|change] default: always