From 0d2c80794fe6e5e5232ec3ecd810defb7c630ff0 Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Mon, 19 Apr 2021 08:27:12 +0900 Subject: [PATCH 1/4] Update Cask file --- Cask | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Cask b/Cask index a9fde9ec..d992fad3 100644 --- a/Cask +++ b/Cask @@ -1,15 +1,17 @@ (package "php-mode" "1.24.0" "Major mode for editing PHP code") (source melpa) -(package-file "php-mode.el") +(package-file "lisp/php-mode.el") (files - "php.el" - "php-face.el" - "php-project.el" - "php-mode-debug.el") + "lisp/php.el" + "lisp/php-face.el" + "lisp/php-project.el" + "lisp/php-local-manual.el" + "lisp/php-mode-debug.el") (development (depends-on "pkg-info") (depends-on "projectile") + (depends-on "smart-jump") (depends-on "shut-up")) From 9c09ebd8e4ee784fb09a51232a44fae55234c33b Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Sat, 1 May 2021 00:17:20 +0900 Subject: [PATCH 2/4] Load cask files in make test --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2d630dca..d9f458ab 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,11 @@ dev: # command. test: clean all touch tests/project/1/.git - $(EMACS) -Q -batch -l lisp/php-mode-autoloads.el \ - -l tests/php-mode-test.el -f ert-run-tests-batch-and-exit + $(EMACS) -Q -batch -L lisp/ --eval \ + "(let ((default-directory (expand-file-name \".cask\" default-directory))) \ + (require 'package) \ + (normal-top-level-add-subdirs-to-load-path))" \ + -f package-initialize \ + -l tests/php-mode-test.el -f ert-run-tests-batch-and-exit .PHONY: all authors autoloads clean test From 7a0148ecbaf69b34ba26254d55ee9b6d678b4517 Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Sat, 1 May 2021 00:19:40 +0900 Subject: [PATCH 3/4] Add conao3/setup-cask for CI --- .github/workflows/test.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7b354bcc..25d4be7d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,11 +24,17 @@ jobs: - emacs_version: snapshot allow_failure: true steps: + - uses: actions/setup-python@v2 + with: + python-version: '3.6' + architecture: 'x64' - uses: purcell/setup-emacs@master with: version: ${{ matrix.emacs_version }} - - - uses: actions/checkout@v1 + - uses: conao3/setup-cask@master + with: + version: 'snapshot' + - uses: actions/checkout@v2 - name: Run tests if: matrix.allow_failure != true run: 'make test' From bba5a50d3cce6ccf728a2b9685ca60d90adf7a8f Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Sat, 1 May 2021 00:24:09 +0900 Subject: [PATCH 4/4] Add Cask to Makefile --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d9f458ab..c495e2d6 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ EMACS ?= emacs +CASK ?= cask 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 AUTOLOADS = php-mode-autoloads.el ELCS = $(ELS:.el=.elc) @@ -24,12 +25,15 @@ AUTHORS.md: etc/git/AUTHORS.md.in .mailmap autoloads: $(AUTOLOADS) -$(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 +$(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 $(EMACS) -Q -batch -L lisp/ --eval \ "(progn \ (require 'package) \ (package-generate-autoloads \"php-mode\" (expand-file-name \"lisp\")))" +.cask: Cask + $(CASK) install + clean: rm -f $(ELCS) $(AUTOLOADS) @@ -50,7 +54,7 @@ dev: # # for an example of using a script like this with the 'git bisect run' # command. -test: clean all +test: .cask clean all touch tests/project/1/.git $(EMACS) -Q -batch -L lisp/ --eval \ "(let ((default-directory (expand-file-name \".cask\" default-directory))) \