From 379284205f472b9c37701ffdbf4291795f6a2a77 Mon Sep 17 00:00:00 2001 From: JenChieh Date: Wed, 13 Sep 2023 23:27:19 -0700 Subject: [PATCH 1/2] test: Build with Eask --- .github/dependabot.yml | 6 +++++ .github/workflows/test.yml | 54 ++++++++++++++++++++++++++++++++++++++ .gitignore | 2 ++ Eask | 16 +++++++++++ 4 files changed, 78 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/test.yml create mode 100644 Eask diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..253bcb7 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: daily diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..fff42f0 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,54 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.experimental }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + emacs-version: + - 26.3 + - 27.2 + - 28.2 + - 29.1 + experimental: [false] + include: + - os: ubuntu-latest + emacs-version: snapshot + experimental: true + - os: macos-latest + emacs-version: snapshot + experimental: true + - os: windows-latest + emacs-version: snapshot + experimental: true + + steps: + - uses: actions/checkout@v4 + + - uses: jcs090218/setup-emacs@master + with: + version: ${{ matrix.emacs-version }} + + - uses: emacs-eask/setup-eask@master + with: + version: 'snapshot' + + - name: Run tests + run: | + eask package + eask install + eask compile diff --git a/.gitignore b/.gitignore index 13e3fba..ce8a759 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ *~ /*-autoloads.el /.cask/ +/.eask/ +/dist diff --git a/Eask b/Eask new file mode 100644 index 0000000..83cdd4e --- /dev/null +++ b/Eask @@ -0,0 +1,16 @@ +(package "muldoc" + "0.4.0" + "Multi ElDoc integration") + +(website-url "https://github.com/emacs-php/muldoc") +(keywords "tools" "extension") + +(package-file "muldoc.el") + +(script "test" "echo \"Error: no test specified\" && exit 1") + +(source 'gnu) + +(depends-on "emacs" "25.1") + +(setq network-security-level 'low) ; see https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-932956432 From bd56f5584198da6e549aaccedf3ede5780f305ed Mon Sep 17 00:00:00 2001 From: JenChieh Date: Wed, 13 Sep 2023 23:31:09 -0700 Subject: [PATCH 2/2] complete test --- .github/workflows/test.yml | 5 +---- Makefile | 27 +++++++++++++-------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fff42f0..d254265 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,7 +48,4 @@ jobs: version: 'snapshot' - name: Run tests - run: | - eask package - eask install - eask compile + run: make ci diff --git a/Makefile b/Makefile index 382c42b..a43db47 100644 --- a/Makefile +++ b/Makefile @@ -1,23 +1,22 @@ EMACS ?= emacs -ELS = muldoc.el -AUTOLOADS = muldoc-autoloads.el -ELCS = $(ELS:.el=.elc) +EASK ?= eask -%.elc: %.el - $(EMACS) -Q -batch -L . -f batch-byte-compile $< +install: + $(EASK) package + $(EASK) install -all: autoloads $(ELCS) +compile: + $(EASK) compile -autoloads: $(AUTOLOADS) +ci: clean autoloads install compile -$(AUTOLOADS): $(ELS) - $(EMACS) -Q -batch -L . --eval \ - "(progn \ - (require 'package) \ - (package-generate-autoloads \"muldoc\" default-directory))" +all: autoloads compile + +autoloads: + $(EASK) generate autoloads clean: - rm -f $(ELCS) $(AUTOLOADS) + $(EASK) clean all test: clean all - $(EMACS) -Q -batch -L . -l tests/muldoc-test.el -f ert-run-tests-batch-and-exit + $(EASK) test ert tests/muldoc-test.el