Skip to content

test: cover context menu capture and real Magit diff metadata #1795

test: cover context menu capture and real Magit diff metadata

test: cover context menu capture and real Magit diff metadata #1795

Workflow file for this run

name: unit-tests
on:
push:
pull_request:
jobs:
ert:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Emacs
run: |
sudo apt-get update
sudo apt-get install -y emacs
emacs --version
- name: Install Elisp dependencies
run: |
emacs -Q --batch --eval "
(progn
(require 'package)
(setq package-archives
'((\"gnu\" . \"https://elpa.gnu.org/packages/\")
(\"nongnu\" . \"https://elpa.nongnu.org/nongnu/\")
(\"melpa\" . \"https://melpa.org/packages/\")))
(package-initialize)
(package-refresh-contents)
(dolist (pkg '(compat transient magit))
(unless (package-installed-p pkg)
(package-install pkg))))"
- name: Run unit tests
run: |
emacs -Q -batch -L . \
--eval "(progn (require 'package) (package-initialize))" \
-l test/test_00-bootstrap.el \
-l ert \
--eval "(mapc #'load-file (file-expand-wildcards \"test/test_*.el\"))" \
-f ert-run-tests-batch-and-exit
- name: Run real Magit integration tests
run: |
emacs -Q --batch -L . \
--eval "(progn (require 'package) (package-initialize) (require 'magit))" \
-l test/integration/test_ai-code-magit.el \
-f ert-run-tests-batch-and-exit
- name: Compile and check documentation for Magit handoff
run: |
emacs -Q --batch -L . \
--eval "(progn (require 'package) (package-initialize))" \
--eval "(progn (require 'bytecomp) (let ((byte-compile-error-on-warn t)) (unless (byte-compile-file \"ai-code-magit.el\") (kill-emacs 1))))" \
--eval "(dolist (file '(\"ai-code-change.el\" \"ai-code-discussion.el\" \"ai-code-agile.el\" \"ai-code-file.el\")) (unless (byte-compile-file file) (kill-emacs 1)))" \
--eval "(progn (require 'checkdoc) (dolist (file '(\"ai-code-magit.el\" \"ai-code-change.el\" \"ai-code-discussion.el\" \"ai-code-agile.el\" \"ai-code-file.el\" \"test/integration/test_ai-code-magit.el\")) (checkdoc-file file)))"
windows-platform:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Emacs
shell: pwsh
run: |
choco install emacs --no-progress -y
emacs --version
- name: Run native Windows platform tests
shell: pwsh
run: |
emacs -Q --batch -L . -l ert -l test/test_ai-code-backends-infra-platform.el -f ert-run-tests-batch-and-exit