Add GitLab CI/CD settings
This commit is contained in:
parent
592067ef70
commit
714f2c6ef7
5 changed files with 86 additions and 2 deletions
38
.gitlab-ci.yml
Normal file
38
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
image: silex/emacs:26.1-alpine-dev
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- test
|
||||||
|
- package
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
test-oni-bookmark:
|
||||||
|
stage: test
|
||||||
|
script: make test-oni-bookmark
|
||||||
|
|
||||||
|
test-oni-alert:
|
||||||
|
stage: test
|
||||||
|
script: make test-oni-alert
|
||||||
|
|
||||||
|
package:
|
||||||
|
stage: package
|
||||||
|
before_script:
|
||||||
|
- rm -rf bin/
|
||||||
|
- mkdir bin/
|
||||||
|
script: make package
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- bin/
|
||||||
|
|
||||||
|
deploy-oni-bookmark:
|
||||||
|
stage: deploy
|
||||||
|
dependencies:
|
||||||
|
- package
|
||||||
|
before_script:
|
||||||
|
- mkdir ~/.ssh/
|
||||||
|
- echo "$DEPLOY_KEY" > ~/.ssh/id_rsa
|
||||||
|
- chmod 600 ~/.ssh/id_rsa
|
||||||
|
- echo -e "$SSH_CONFIG" > ~/.ssh/config
|
||||||
|
- echo "$KNOWN_HOSTS" > ~/.ssh/known_hosts
|
||||||
|
- apk update && apk add rsync
|
||||||
|
script:
|
||||||
|
- rsync -v -c -r --delete bin/ elpa@ryuslash.org:usr/share/emacs/elpa
|
26
GNUmakefile
Normal file
26
GNUmakefile
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
FILES := $(wildcard *.el)
|
||||||
|
|
||||||
|
PACKAGE_TARGETS := $(addprefix package-,$(FILES))
|
||||||
|
|
||||||
|
package: $(PACKAGE_TARGETS)
|
||||||
|
|
||||||
|
package-%: %
|
||||||
|
emacs --batch \
|
||||||
|
--load oni-package.el \
|
||||||
|
--funcall package-initialize \
|
||||||
|
--eval '(package-upload-file "$^")'
|
||||||
|
|
||||||
|
test-%:
|
||||||
|
emacs --batch \
|
||||||
|
--load oni-package.el \
|
||||||
|
--funcall package-initialize \
|
||||||
|
--eval '(package-refresh-contents)' \
|
||||||
|
--load ert \
|
||||||
|
--load "test/$*-test.el" \
|
||||||
|
--funcall package-initialize \
|
||||||
|
--eval "(package-install-file \"oni-data-dir.el\")" \
|
||||||
|
--eval "(package-install-file \"$*.el\")" \
|
||||||
|
--funcall ert-run-tests-batch-and-exit
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -fv $(FILES)
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
;; Keywords: local
|
;; Keywords: local
|
||||||
;; Version: 20190218235251
|
;; Version: 20190314002658
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
;; it under the terms of the GNU General Public License as published by
|
;; it under the terms of the GNU General Public License as published by
|
||||||
|
@ -48,10 +48,12 @@
|
||||||
(add-to-list 'package-archives
|
(add-to-list 'package-archives
|
||||||
`("oni" . "https://ryuslash.org/elpa/"))
|
`("oni" . "https://ryuslash.org/elpa/"))
|
||||||
|
|
||||||
|
(setq package-update-news-on-upload t)
|
||||||
|
|
||||||
;;; Specify where to upload packages to. Used by
|
;;; Specify where to upload packages to. Used by
|
||||||
;;; ‘package-upload-buffer’ and ‘package-upload-file’.
|
;;; ‘package-upload-buffer’ and ‘package-upload-file’.
|
||||||
(setq package-archive-upload-base
|
(setq package-archive-upload-base
|
||||||
"/ssh:ryuslash.org:usr/share/emacs/elpa/")
|
"bin/")
|
||||||
|
|
||||||
;;; Temporary fix for `package-maint-add-news-item', until I get my
|
;;; Temporary fix for `package-maint-add-news-item', until I get my
|
||||||
;;; Copyright assignment back in order.
|
;;; Copyright assignment back in order.
|
||||||
|
|
9
test/oni-alert-test.el
Normal file
9
test/oni-alert-test.el
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
(ert-deftest oni-alert-test-autoloads ()
|
||||||
|
"Test that `oni-alert' gets loaded automatically."
|
||||||
|
(require 'alert)
|
||||||
|
(should (featurep 'oni-alert)))
|
||||||
|
|
||||||
|
(ert-deftest oni-alert-test-sets-default-style ()
|
||||||
|
"Test that `oni-alert' test the default style."
|
||||||
|
(require 'alert)
|
||||||
|
(should (eql alert-default-style 'libnotify)))
|
9
test/oni-bookmark-test.el
Normal file
9
test/oni-bookmark-test.el
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
(ert-deftest oni-bookmark-test-sets-default-file ()
|
||||||
|
"Test that oni-bookarks works."
|
||||||
|
(require 'bookmark)
|
||||||
|
(should (string-match "/data/" bookmark-default-file)))
|
||||||
|
|
||||||
|
(ert-deftest oni-bookmark-test-autoloads ()
|
||||||
|
"Test that `oni-bookmark' gets loaded automatically."
|
||||||
|
(require 'bookmark)
|
||||||
|
(should (featurep 'oni-bookmark)))
|
Loading…
Reference in a new issue