[tests] Test elisp via GitHub Actions

This commit is contained in:
JAremko 2020-08-30 08:00:45 +03:00 committed by Eugene Yaremenko
parent b7253e0433
commit df9ff05555
3 changed files with 45 additions and 5 deletions

View File

@ -65,5 +65,5 @@ skip_when_branch_update () {
}
cleanup () {
rm -rf ~/.emacs.d/elpa ~/.emacs.d/.cache -f ~/.spacemacs
rm -rf ~/.emacs.d/elpa ~/.emacs.d/.cache ~/.spacemacs
}

View File

@ -2,7 +2,7 @@
## Testing script for CircleCI
##
## Copyright (c) 2012-2014 Sylvain Benner
## Copyright (c) 2014-2018 Sylvain Benner & Contributors
## Copyright (c) 2014-2020 Sylvain Benner & Contributors
##
## Author: Eugene Yaremenko
## URL: https://github.com/syl20bnr/spacemacs
@ -11,10 +11,16 @@
##
## License: GPLv3
cleanup
# realpath for OS X https://stackoverflow.com/a/3572105/1224362
abs_p() {
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
}
testdir=~/.emacs.d/tests/$1
echo_headline "Running '$2' for '$1' in '$testdir' folder"
ln -s "$(pwd)" ~/.emacs.d
testdir=$(abs_p tests/$1)
cd ..
echo "Running '$2' for '$1' in '$testdir' folder"
if [ -f $testdir/dotspacemacs.el ]; then
cp $testdir/dotspacemacs.el ~/.spacemacs
fi

34
.github/workflows/test.yml vendored Executable file
View File

@ -0,0 +1,34 @@
name: emacs_test
on:
pull_request:
push:
branches:
- master
- develop
env:
SCRIPT: './.github/workflows/scripts/test'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
emacs_version: [26.3, 27.1, snapshot]
test_root:
- 'core'
- 'layers/+distribution/spacemacs-base'
- 'layers/+distribution/spacemacs'
steps:
- uses: purcell/setup-emacs@master
with:
version: ${{ matrix.emacs_version }}
- uses: actions/checkout@v2
- name: "Dependencies installation"
run: '${{ env.SCRIPT }} ${{ matrix.test_root }} installation'
- name: "Unit testing"
run: '${{ env.SCRIPT }} ${{ matrix.test_root }} unit_tests'
- name: "Functional testing"
run: '${{ env.SCRIPT }} ${{ matrix.test_root }} func_tests'