Skip to content

Commit f8b3080

Browse files
committed
ci: Split tests
1 parent e6752b4 commit f8b3080

File tree

4 files changed

+46
-13
lines changed

4 files changed

+46
-13
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ jobs:
3838

3939
- uses: actions/checkout@v2
4040
- name: Test commands
41-
run: sh ./test/test_commands.sh
41+
run: make test

Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
SHELL := /usr/bin/env bash
2+
3+
EMACS ?= emacs
4+
EASK ?= eask
5+
6+
.PHONY: test-global test-local
7+
8+
test: test-global test-local
9+
10+
test-global:
11+
@echo "Test global commands..."
12+
sh ./test/test_global.sh
13+
14+
test-local:
15+
@echo "Test local commands..."
16+
sh ./test/test_local.sh

test/test_global.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (C) 2022 Jen-Chieh Shen
4+
5+
# This program is free software; you can redistribute it and/or modify
6+
# it under the terms of the GNU General Public License as published by
7+
# the Free Software Foundation; either version 3, or (at your option)
8+
# any later version.
9+
10+
# This program is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU General Public License for more details.
14+
15+
# You should have received a copy of the GNU General Public License
16+
# along with GNU Emacs; see the file COPYING. If not, write to the
17+
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18+
# Boston, MA 02110-1301, USA.
19+
20+
npm install
21+
CMD="node eask"
22+
23+
# Copy test configuration
24+
cp -R ./test/mini.emacs.d/ ~/.emacs.d
25+
26+
# Test for global commands
27+
$CMD archives -g
28+
$CMD install -g spinner ivy beacon
29+
$CMD list --depth=0 -g
Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,9 @@
2020
npm install
2121
CMD="node eask"
2222

23-
echo "[INFO] 'eask' version: "
24-
$CMD --version
25-
26-
# Copy test configuration
27-
cp -R ./test/mini.emacs.d/ ~/.emacs.d
28-
29-
# Test for global commands
30-
$CMD archives -g
31-
$CMD install -g spinner ivy beacon
32-
$CMD list --depth=0 -g
33-
3423
# Clone a project simulate Emacs package development
3524
git clone "https://github.com/jcs-elpa/parse-it" "../parse-it"
3625
cd '../parse-it'
37-
3826
CMD="node ../eask/eask"
3927

4028
# Test for local commands

0 commit comments

Comments
 (0)