Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

project management: Cask, tests and CI #17

Merged
merged 1 commit into from
Jul 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
project management: Cask, tests and CI
Use the ``cask`` library for project management.  Use ``ert`` for tests.
Adds an exemplary test for the PEP8Bear.  CI is also part of project
management.

Closes #11
fleimgruber committed Jul 20, 2017
commit 64cadb4441c039580a9a7bd6274a634c39a2532f
8 changes: 8 additions & 0 deletions .coafile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Default]
enabled = True

[commit]
bears = GitCommitBear

[python]
bears = PEP8Bear
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
language: python
sudo: no
python:
- 3.4
- 3.5
- 3.6
env:
- EVM_EMACS=emacs-24.4-travis
- EVM_EMACS=emacs-24.5-travis
- EVM_EMACS=emacs-25.1-travis
- EVM_EMACS=emacs-25.2-travis
before_install:
- curl -fsSkL https://gist.github.com/rejeep/ebcd57c3af83b049833b/raw > travis.sh && source ./travis.sh
- evm install $EVM_EMACS --use --skip
- cask
install:
- pip install -r requirements.txt
script:
- PYTHONPATH="`pwd`" cask exec ert-runner
10 changes: 10 additions & 0 deletions Cask
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(source gnu)
(source melpa)

(package "flycheck-coala" "0.1" "Flycheck plugin for coala.io code analyzer")

(development
(depends-on "dash")
(depends-on "flycheck")
(depends-on "f")
(depends-on "ert-runner"))
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Flycheck coala Checker
======================
[![Build Status](https://travis-ci.org/coala/coala-emacs.svg?branch=master)](https://travis-ci.org/coala/coala-emacs)

Integrate [coala](https://coala.io) with
[flycheck](http://www.flycheck.org).
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
coala
coala-bears
pyflakes~=1.4.0
18 changes: 18 additions & 0 deletions test/coala-test.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
;;; coala-emacs --- tests
;;; Commentary:
(require 'flycheck)
(require 'flycheck-ert)

;;; Code:

;;; Directories

(flycheck-ert-def-checker-test coala python coala-python
(unwind-protect
(flycheck-ert-should-syntax-check
"test/resources/language/pep8.py" 'python-mode
'(1 nil warning "The code does not comply to PEP8."
:checker coala))))

(provide 'coala-test)
;;; coala-test.el ends here
1 change: 1 addition & 0 deletions test/resources/language/pep8.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a = 1 + 1 # <- not PEP8 compliant
7 changes: 7 additions & 0 deletions test/test-helper.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
;; -*- lexical-binding: t -*-

(require 'f)
(let ((coala-emacs-dir (f-parent (f-dirname (f-this-file)))))
(add-to-list 'load-path coala-emacs-dir)
(add-to-list 'process-environment (format "PYTHONPATH=%s" coala-emacs-dir)))
(require 'flycheck-coala)