branch: elpa/flymake-pyrefly
commit c54d16d900ef3962693ff419cbb0cd00801d3338
Merge: 45409e6092 2b08900bca
Author: Boris Shminke <1696493+inpef...@users.noreply.github.com>
Commit: GitHub <nore...@github.com>

    Merge pull request #18 from inpefess/4-add-ci
    
    Add CI
---
 .github/workflows/main.yml | 18 ++++++++++++++++++
 ci-image/Dockerfile        | 14 ++++++++++++++
 run-tests.sh               |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000000..78f5992111
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,18 @@
+name: Test with Emacs
+on: [push]
+jobs:
+  test-with-emacs:
+    runs-on: ubuntu-latest
+    container:
+      image: inpefess/multi-emacs-with-python:2025.07.03
+    steps:
+      - name: Check out repository code
+        uses: actions/checkout@v4
+      - name: Install Pyrefly
+        run: |
+          /emacs-tests/.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
diff --git a/ci-image/Dockerfile b/ci-image/Dockerfile
new file mode 100644
index 0000000000..ca238e93cd
--- /dev/null
+++ b/ci-image/Dockerfile
@@ -0,0 +1,14 @@
+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/run-tests.sh b/run-tests.sh
index ca0727a498..6a7ce6eeb6 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
 
 export EMACS_TEST_JUNIT_REPORT=1
-emacs --batch -L . -L tests -l test-flymake-pyrefly \
-      -f ert-run-tests-batch-and-exit
+$EMACS --batch -L . -L tests -l test-flymake-pyrefly \
+       -f ert-run-tests-batch-and-exit

Reply via email to