From 02a597ac15296213343ca0e1bce9392ecc894d10 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Sat, 24 Feb 2024 09:29:05 +0530 Subject: [PATCH 1/4] Use cask for testing --- .github/workflows/check.yaml | 16 ++++++++-------- Cask | 10 ++++++++++ justfile | 14 ++++++++++++++ 3 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 Cask create mode 100644 justfile diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 2a5df1a..e710241 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -15,7 +15,7 @@ jobs: fail-fast: false matrix: emacs_version: - - release-snapshot + - 29.2 - 29.1 - 28.2 - 27.2 @@ -29,19 +29,19 @@ jobs: - uses: purcell/setup-emacs@master with: version: ${{ matrix.emacs_version }} + - uses: cask/setup-cask@v1 + with: + version: 0.9.0 - uses: leotaku/elisp-check@v1.3 with: file: "justl.el" check: melpa ignore_warnings: ${{ matrix.ignore_warnings }} warnings_as_errors: false - - name: ERT tests - uses: leotaku/elisp-check@master - with: - file: ./test/justl-test.el - check: ert - ignore_warnings: ${{ matrix.ignore_warnings }} - warnings_as_errors: true + - name: Run tests + run: | + just build + just test - name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') diff --git a/Cask b/Cask new file mode 100644 index 0000000..f4abccd --- /dev/null +++ b/Cask @@ -0,0 +1,10 @@ +(source gnu) +(source melpa) + +(package-file "justl.el") + +(development + (depends-on "transient") + (depends-on "s") + (depends-on "f") + (depends-on "inheritenv")) diff --git a/justfile b/justfile new file mode 100644 index 0000000..91d0271 --- /dev/null +++ b/justfile @@ -0,0 +1,14 @@ +# List all recipes +just: + just --list --unsorted + +# Install dependencies and build via cask +build: + emacs --version + cask install + cask build + +# Test +test: + cask emacs --batch -L . -L test -f batch-byte-compile $(cask files) + cask emacs --batch -L . -L test -l test/all-tests.el -f ert-run-tests-batch-and-exit From 06bf36b8062e1a77b501862d8047bb775bb62aa3 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Sat, 24 Feb 2024 09:29:47 +0530 Subject: [PATCH 2/4] Use cask for testing --- Changelog.org | 3 ++- justl.el | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Changelog.org b/Changelog.org index 40ca09a..d150478 100644 --- a/Changelog.org +++ b/Changelog.org @@ -1,4 +1,4 @@ -* Unreleased +* 0.14 - Respect buffer-local environments, for compatibility with ~envrc.el~ when ~just~ is installed on a per-project basis. @@ -6,6 +6,7 @@ list (defaults to on). - Rewritten internals, using ~just~ itself to parse recipe information. - Add ~justl-per-recipe-buffer~ to create new buffers per recipe. +- Use Cask for development and testing. * 0.13 diff --git a/justl.el b/justl.el index a762d96..18cd4d3 100644 --- a/justl.el +++ b/justl.el @@ -19,7 +19,7 @@ ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 ;; USA -;; Version: 0.13 +;; Version: 0.14 ;; Author: Sibi Prabakaran ;; Keywords: just justfile tools processes ;; URL: https://github.com/psibi/justl.el From 96b8a90ae24e899d5d8c76e74d4a560aad54ff26 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Sat, 24 Feb 2024 09:32:23 +0530 Subject: [PATCH 3/4] Fix test patch --- justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/justfile b/justfile index 91d0271..9ab4a3a 100644 --- a/justfile +++ b/justfile @@ -11,4 +11,4 @@ build: # Test test: cask emacs --batch -L . -L test -f batch-byte-compile $(cask files) - cask emacs --batch -L . -L test -l test/all-tests.el -f ert-run-tests-batch-and-exit + cask emacs --batch -L . -L test -l test/justl-test.el -f ert-run-tests-batch-and-exit From 4e1871f701eaa31b29410c3fab97708324c56e42 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Sat, 24 Feb 2024 09:48:04 +0530 Subject: [PATCH 4/4] Remove justfile to not interfere with the test run --- .github/workflows/check.yaml | 8 ++++++-- justfile | 14 -------------- 2 files changed, 6 insertions(+), 16 deletions(-) delete mode 100644 justfile diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index e710241..ef0fa7f 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -40,8 +40,12 @@ jobs: warnings_as_errors: false - name: Run tests run: | - just build - just test + emacs --version + cask install + cask build + mv test/justfile ./justfile + cask emacs --batch -L . -L test -f batch-byte-compile $(cask files) + cask emacs --batch -L . -L test -l test/justl-test.el -f ert-run-tests-batch-and-exit - name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') diff --git a/justfile b/justfile deleted file mode 100644 index 9ab4a3a..0000000 --- a/justfile +++ /dev/null @@ -1,14 +0,0 @@ -# List all recipes -just: - just --list --unsorted - -# Install dependencies and build via cask -build: - emacs --version - cask install - cask build - -# Test -test: - cask emacs --batch -L . -L test -f batch-byte-compile $(cask files) - cask emacs --batch -L . -L test -l test/justl-test.el -f ert-run-tests-batch-and-exit