branch: elpa/flymake-pyrefly
commit d4f6105b6d0cfc40914b19d393e6d31c5101b005
Merge: c54d16d900 9fcce84f85
Author: Boris Shminke <1696493+inpef...@users.noreply.github.com>
Commit: GitHub <nore...@github.com>

    Merge pull request #19 from inpefess/7-apply-format
    
    Apply GNU ELPA formatting guidelines
---
 .elpaignore                |  4 ++++
 .github/workflows/main.yml | 25 +++++++++++++++++++------
 Makefile                   | 20 ++++++++++++++++++++
 ci-image/Dockerfile        | 14 --------------
 flymake-pyrefly.el         | 17 ++++++++++++-----
 run-tests.sh               |  5 -----
 6 files changed, 55 insertions(+), 30 deletions(-)

diff --git a/.elpaignore b/.elpaignore
new file mode 100644
index 0000000000..ada35494d1
--- /dev/null
+++ b/.elpaignore
@@ -0,0 +1,4 @@
+Makefile
+tests
+.github
+.gitignore
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 78f5992111..79c2b809d0 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -3,16 +3,29 @@ on: [push]
 jobs:
   test-with-emacs:
     runs-on: ubuntu-latest
-    container:
-      image: inpefess/multi-emacs-with-python:2025.07.03
+    strategy:
+      fail-fast: true
+      matrix:
+        emacs_version: [26.1, 26.3, 27.2, 28.2, 29.4, 30.1]
+
     steps:
+      - name: Setup Emacs
+        uses: purcell/setup-emacs@master
+        with:
+          version: ${{ matrix.emacs_version }}
+      - uses: actions/setup-python@v5
+        with:
+          python-version: '3.13'
       - name: Check out repository code
         uses: actions/checkout@v4
       - name: Install Pyrefly
         run: |
-          /emacs-tests/.venv/bin/pip install pyrefly
+          python -m venv .venv
+          .venv/bin/pip install pyrefly
       - name: Test with Emacs
         run: |
-          export EMACS=/emacs-tests/emacs-30.1/.local/bin/emacs
-          export PYREFLY_BIN_DIR=/emacs-tests/.venv/bin
-          ./run-tests.sh
+          export PYREFLY_BIN_DIR=$(pwd)/.venv/bin
+          make test
+      - name: Compile
+        run: |
+          make compile
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000000..bdd2a968fd
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+ALL_TARGETS = help clean test compile
+EMACS_TEST_JUNIT_REPORT=1
+
+.PHONY: ${ALL_TARGETS}
+
+help:
+       @echo Targets:
+       @for t in ${ALL_TARGETS}; do echo "- "$$t; done
+
+clean:
+       @rm -rf *.elc test/*.elc
+
+test:
+       emacs --batch -L . -L tests -l test-flymake-pyrefly \
+       -f ert-run-tests-batch-and-exit
+
+compile:
+       emacs --batch -L . \
+       --eval "(setq byte-compile-error-on-warn t)" \
+       -f batch-byte-compile flymake-pyrefly.el
diff --git a/ci-image/Dockerfile b/ci-image/Dockerfile
deleted file mode 100644
index ca238e93cd..0000000000
--- a/ci-image/Dockerfile
+++ /dev/null
@@ -1,14 +0,0 @@
-FROM python:3.13-slim
-RUN mkdir /emacs-tests
-WORKDIR /emacs-tests
-RUN apt-get update
-RUN apt-get install -y build-essential wget libgccjit-12-dev \
-    zlib1g-dev libncurses-dev texinfo python3-venv
-RUN python3 -m venv .venv
-RUN wget http://mirror.cyberbits.eu/gnu/emacs/emacs-30.1.tar.xz
-RUN tar -xvf emacs-30.1.tar.xz
-WORKDIR ./emacs-30.1
-RUN ./configure --prefix $(pwd)/.local --with-gnutls=ifavailable
-RUN make
-RUN make install
-WORKDIR /emacs-tests
diff --git a/flymake-pyrefly.el b/flymake-pyrefly.el
index 5163cdd01c..a9f600c7d6 100644
--- a/flymake-pyrefly.el
+++ b/flymake-pyrefly.el
@@ -1,5 +1,15 @@
-;;; flymake-pyrefly.el --- A Pyrefly Flymake backend. -*- lexical-binding: t; 
-*-
-;; Copyright (C) 2025  Boris Shminke
+;;; flymake-pyrefly.el --- A Pyrefly Flymake backend  -*- lexical-binding: t; 
-*-
+
+;; Copyright (C) 2025 Free Software Foundation, Inc.
+;; Author: Boris Shminke <bo...@shminke.com>
+;; Maintainer: Boris Shminke <bo...@shminke.com>
+;; Created: 29 Jun 2025
+;; Version: 0.1.0
+;; Keywords: tools, languages
+;; URL: https://github.com/inpefess/flymake-pyrefly
+;; Package-Requires: ((emacs "26.1"))
+
+;; This file is not part of GNU Emacs.
 
 ;; This program is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -14,13 +24,10 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-;;; Version: 0.0.1
-
 ;;; Commentary:
 ;; Based on the annotated example from Flymake info.
 ;; Usage:
 ;;   (use-package flymake-pyrefly
-;;     :vc (:url "https://github.com/inpefess/flymake-pyrefly.git";)
 ;;     :hook (python-mode . pyrefly-setup-flymake-backend))
 
 ;;; Code:
diff --git a/run-tests.sh b/run-tests.sh
deleted file mode 100755
index 6a7ce6eeb6..0000000000
--- a/run-tests.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-
-export EMACS_TEST_JUNIT_REPORT=1
-$EMACS --batch -L . -L tests -l test-flymake-pyrefly \
-       -f ert-run-tests-batch-and-exit

Reply via email to