Skip to content

Commit 209913f

Browse files
authored
Merge pull request #664 from emacs-php/feature/load-cask-in-compilation
Load cask in testing
2 parents ac5301d + bba5a50 commit 209913f

File tree

3 files changed

+27
-11
lines changed

3 files changed

+27
-11
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,17 @@ jobs:
2424
- emacs_version: snapshot
2525
allow_failure: true
2626
steps:
27+
- uses: actions/setup-python@v2
28+
with:
29+
python-version: '3.6'
30+
architecture: 'x64'
2731
- uses: purcell/setup-emacs@master
2832
with:
2933
version: ${{ matrix.emacs_version }}
30-
31-
- uses: actions/checkout@v1
34+
- uses: conao3/setup-cask@master
35+
with:
36+
version: 'snapshot'
37+
- uses: actions/checkout@v2
3238
- name: Run tests
3339
if: matrix.allow_failure != true
3440
run: 'make test'

Cask

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
(package "php-mode" "1.24.0" "Major mode for editing PHP code")
22
(source melpa)
33

4-
(package-file "php-mode.el")
4+
(package-file "lisp/php-mode.el")
55

66
(files
7-
"php.el"
8-
"php-face.el"
9-
"php-project.el"
10-
"php-mode-debug.el")
7+
"lisp/php.el"
8+
"lisp/php-face.el"
9+
"lisp/php-project.el"
10+
"lisp/php-local-manual.el"
11+
"lisp/php-mode-debug.el")
1112

1213
(development
1314
(depends-on "pkg-info")
1415
(depends-on "projectile")
16+
(depends-on "smart-jump")
1517
(depends-on "shut-up"))

Makefile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
EMACS ?= emacs
2+
CASK ?= cask
23
ELS = lisp/php.el lisp/php-align.el lisp/php-face.el lisp/php-project.el lisp/php-local-manual.el lisp/php-mode.el lisp/php-mode-debug.el
34
AUTOLOADS = php-mode-autoloads.el
45
ELCS = $(ELS:.el=.elc)
@@ -24,12 +25,15 @@ AUTHORS.md: etc/git/AUTHORS.md.in .mailmap
2425

2526
autoloads: $(AUTOLOADS)
2627

27-
$(AUTOLOADS): lisp/php.el lisp/php-align.el lisp/php-face.el lisp/php-project.el lisp/php-mode-debug.el lisp/php-mode.el
28+
$(AUTOLOADS): lisp/php.el lisp/php-align.el lisp/php-face.el lisp/php-project.el lisp/php-local-manual.el lisp/php-mode-debug.el lisp/php-mode.el
2829
$(EMACS) -Q -batch -L lisp/ --eval \
2930
"(progn \
3031
(require 'package) \
3132
(package-generate-autoloads \"php-mode\" (expand-file-name \"lisp\")))"
3233

34+
.cask: Cask
35+
$(CASK) install
36+
3337
clean:
3438
rm -f $(ELCS) $(AUTOLOADS)
3539

@@ -50,9 +54,13 @@ dev:
5054
#
5155
# for an example of using a script like this with the 'git bisect run'
5256
# command.
53-
test: clean all
57+
test: .cask clean all
5458
touch tests/project/1/.git
55-
$(EMACS) -Q -batch -l lisp/php-mode-autoloads.el \
56-
-l tests/php-mode-test.el -f ert-run-tests-batch-and-exit
59+
$(EMACS) -Q -batch -L lisp/ --eval \
60+
"(let ((default-directory (expand-file-name \".cask\" default-directory))) \
61+
(require 'package) \
62+
(normal-top-level-add-subdirs-to-load-path))" \
63+
-f package-initialize \
64+
-l tests/php-mode-test.el -f ert-run-tests-batch-and-exit
5765

5866
.PHONY: all authors autoloads clean test

0 commit comments

Comments
 (0)