Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
galaunay committed Nov 15, 2020
1 parent 329ab74 commit a38d09d
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 162 deletions.
52 changes: 0 additions & 52 deletions .github/workflows/blank.yml

This file was deleted.

79 changes: 79 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: CI

on:
push:
branches:
- main
pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
emacs_version:
# - 24.1
# - 24.2
# - 24.3
# - 24.4
# - 24.5
# - 25.1
# - 25.2
# - 25.3
- 26.1
- 26.2
- 26.3
- 27.1
- snapshot
python_version:
- 2.7
- 3.5
- 3.6
- 3.7
- 3.8
steps:
# Checkout
- uses: actions/checkout@v2
# Emacs
- name: Set up Emacs ${{ matrix.emacs_version }}
uses: purcell/setup-emacs@master
with:
version: ${{ matrix.emacs_version }}
# Cask
- name: Set up Cask
uses: conao3/setup-cask@master
with:
version: 'snapshot'
# Python
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v2
with:
python-version : ${{ matrix.python_version }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt --upgrade
pip install -r requirements-rpc.txt --upgrade
pip install -r requirements-dev.txt --upgrade
if [[ ${{ matrix.python_version }} > 3.5 ]] ; then
pip install -r requirements-rpc3.6.txt --upgrade ;
fi
if [[ ${{ matrix.python_version }} < 3 ]] ; then
pip install -r requirements-dev2.txt --upgrade ;
fi
pip install coveralls
python -m virtualenv $HOME/.virtualenvs/elpy-test-venv
# Run tests
- name: Run tests
run: |
nosetests
cask install
PYTHONPATH="`pwd`" cask exec ert-runner --reporter ert+duration
# Coveralls
- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coverage run -m nose.__main__
coveralls
79 changes: 0 additions & 79 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ mock==3.0.5
nose==1.3.7
twine==1.15.0
wheel==0.34.2
virtualenv==20.1.0
6 changes: 4 additions & 2 deletions test/elpy-format-code-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
(should (string= backend-called "autopep8"))
)))

(ert-deftest elpy-should-format-code-with-autopep8-formatter ()
(ert-deftest elpy-should-format-code-with-black-formatter ()
(let ((elpy-formatter 'black)
backend-called)
(elpy-testcase ()
Expand All @@ -56,7 +56,9 @@
"x = 3")

(mletf* ((elpy-black-fix-code ()
(setq backend-called "black")))
(setq backend-called "black"))
(elpy-config--package-available-p (formatter)
t))
(call-interactively 'elpy-format-code))

(should (string= backend-called "black"))
Expand Down
4 changes: 2 additions & 2 deletions test/elpy-rpc-get-virtualenv-path-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
(elpy-testcase ()
(let ((elpy-rpc-virtualenv-path 'current)
(old-venv pyvenv-virtual-env))
(should (string-match "\\(travis/virtualenv/python\\|.virtualenvs/elpy\\)"
(elpy-rpc-get-virtualenv-path)))
(should-not (string-match "elpy-test-venv"
(elpy-rpc-get-virtualenv-path)))
(pyvenv-workon "elpy-test-venv")
(should (string-match "elpy-test-venv" (elpy-rpc-get-virtualenv-path)))
(if old-venv
Expand Down
2 changes: 1 addition & 1 deletion test/elpy-shell-send-file-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(elpy-testcase ()
(elpy-enable)
(python-mode)
(let ((test-string (make-string 6000 ?a))
(let ((test-string (make-string 3000 ?a))
(process (elpy-shell-get-or-create-process)))
(python-shell-send-string
(format "print('start');foo='%s';print('end');" test-string) process)
Expand Down
26 changes: 0 additions & 26 deletions travis-evm-cask.sh

This file was deleted.

0 comments on commit a38d09d

Please sign in to comment.