Repository navigation
78 lines (66 loc) · 3.25 KB
/
Copy pathunit-tests.yml
File metadata and controls
78 lines (66 loc) · 3.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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 annotate))
(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 \
-l test/integration/test_ai-code-annotate-magit.el \
-l test/integration/test_ai-code-task.el \
-l test/integration/test_ai-code-verify.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 "(let ((byte-compile-error-on-warn t)) (dolist (file '(\"ai-code-annotation.el\" \"ai-code-annotation-list.el\" \"ai-code-annotate-magit.el\")) (unless (byte-compile-file file) (kill-emacs 1))))" \
--eval "(dolist (file '(\"ai-code-change.el\" \"ai-code-discussion.el\" \"ai-code-agile.el\" \"ai-code-file.el\" \"ai-code-prompt-mode.el\")) (unless (byte-compile-file file) (kill-emacs 1)))" \
--eval "(progn (require 'checkdoc) (dolist (file '(\"ai-code-magit.el\" \"ai-code-annotation.el\" \"ai-code-annotation-list.el\" \"ai-code-annotate-magit.el\" \"ai-code-change.el\" \"ai-code-discussion.el\" \"ai-code-agile.el\" \"ai-code-file.el\" \"ai-code-prompt-mode.el\" \"test/integration/test_ai-code-magit.el\" \"test/integration/test_ai-code-annotate-magit.el\" \"test/test_ai-code-annotation.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