1
0
Fork 0

Switch the Test and Package stages

In order to simplify the testing of each package, do the packaging step first so
that when it gets to the testing stage it can load the packaged files from the
local repository and manage the interdependencies that way.
This commit is contained in:
Tom Willemse 2019-12-11 00:31:28 -08:00
parent 977f795e03
commit e62e994630
2 changed files with 51 additions and 142 deletions

View file

@ -2,8 +2,8 @@ image: silex/emacs:26.3-alpine-dev
stages: stages:
- pre-package-multifile - pre-package-multifile
- test
- package - package
- test
- deploy - deploy
package-oni-conf: package-oni-conf:
@ -116,50 +116,6 @@ package-oni-twig:
paths: paths:
- oni-twig/dist/ - oni-twig/dist/
test-oni-alert:
stage: test
script: make test-oni-alert
test-oni-bookmark:
stage: test
script: make test-oni-bookmark
test-oni-conf:
stage: test
dependencies:
- package-oni-conf
needs: [package-oni-conf]
script: make test-oni-conf
test-oni-css:
stage: test
dependencies:
- package-oni-css
needs: [package-oni-css]
script: make test-oni-css
test-oni-elisp:
stage: test
dependencies:
- package-oni-elisp
needs: [package-oni-elisp]
script: make test-oni-elisp
test-oni-grep:
stage: test
script: make test-oni-grep
test-oni-highlight-indent-guides:
stage: test
script: make test-oni-highlight-indent-guides
test-oni-php:
stage: test
dependencies:
- package-oni-php
needs: [package-oni-php]
script: make test-oni-php
package: package:
stage: package stage: package
dependencies: dependencies:
@ -182,6 +138,54 @@ package:
paths: paths:
- bin/ - bin/
test-oni-alert:
stage: test
dependencies:
- package
script: make test-oni-alert TEST_ARCHIVE=$(realpath bin/)
test-oni-bookmark:
stage: test
dependencies:
- package
script: make test-oni-bookmark TEST_ARCHIVE=$(realpath bin/)
test-oni-conf:
stage: test
dependencies:
- package
script: make test-oni-conf TEST_ARCHIVE=$(realpath bin/)
test-oni-css:
stage: test
dependencies:
- package
script: make test-oni-css TEST_ARCHIVE=$(realpath bin/)
test-oni-elisp:
stage: test
dependencies:
- package
script: make test-oni-elisp TEST_ARCHIVE=$(realpath bin/)
test-oni-grep:
stage: test
dependencies:
- package
script: make test-oni-grep TEST_ARCHIVE=$(realpath bin/)
test-oni-highlight-indent-guides:
stage: test
dependencies:
- package
script: make test-oni-highlight-indent-guides TEST_ARCHIVE=$(realpath bin/)
test-oni-php:
stage: test
dependencies:
- package
script: make test-oni-php TEST_ARCHIVE=$(realpath bin/)
deploy: deploy:
stage: deploy stage: deploy
image: instrumentisto/rsync-ssh image: instrumentisto/rsync-ssh

View file

@ -58,97 +58,9 @@ install-%:
emacs --batch \ emacs --batch \
--load oni-package.el \ --load oni-package.el \
--funcall package-initialize \ --funcall package-initialize \
--eval "(add-to-list 'package-archives '(\"test\" . \"$(TEST_ARCHIVE)\"))" \
--eval '(package-refresh-contents)' \ --eval '(package-refresh-contents)' \
$(foreach DEP,$(DEPS),--eval "(package-install-file \"$(DEP).el\")") \ --eval "(package-install '$*)"
--eval "(package-install-file \"$*.el\")"
install-oni-conf:
emacs --batch \
--load oni-package.el \
--funcall package-initialize \
--eval '(package-refresh-contents)' \
$(foreach DEP,$(DEPS),--eval "(package-install-file \"$(DEP).el\")") \
--eval "(package-install-file (car (sort (file-expand-wildcards \"oni-conf/dist/*.tar\") #'string>)))"
install-oni-css:
emacs --batch \
--load oni-package.el \
--funcall package-initialize \
--eval '(package-refresh-contents)' \
$(foreach DEP,$(DEPS),--eval "(package-install-file \"$(DEP).el\")") \
--eval "(package-install-file (car (sort (file-expand-wildcards \"oni-css/dist/*.tar\") #'string>)))"
install-oni-elisp:
emacs --batch \
--load oni-package.el \
--funcall package-initialize \
--eval '(package-refresh-contents)' \
$(foreach DEP,$(DEPS),--eval "(package-install-file \"$(DEP).el\")") \
--eval "(package-install-file (car (sort (file-expand-wildcards \"oni-elisp/dist/*.tar\") #'string>)))"
install-oni-haml:
emacs --batch \
--load oni-package.el \
--funcall package-initialize \
--eval '(package-refresh-contents)' \
$(foreach DEP,$(DEPS),--eval "(package-install-file \"$(DEP).el\")") \
--eval "(package-install-file (car (sort (file-expand-wildcards \"oni-haml/dist/*.tar\") #'string>)))"
install-oni-html:
emacs --batch \
--load oni-package.el \
--funcall package-initialize \
--eval '(package-refresh-contents)' \
$(foreach DEP,$(DEPS),--eval "(package-install-file \"$(DEP).el\")") \
--eval "(package-install-file (car (sort (file-expand-wildcards \"oni-html/dist/*.tar\") #'string>)))"
install-oni-nxml:
emacs --batch \
--load oni-package.el \
--funcall package-initialize \
--eval '(package-refresh-contents)' \
$(foreach DEP,$(DEPS),--eval "(package-install-file \"$(DEP).el\")") \
--eval "(package-install-file (car (sort (file-expand-wildcards \"oni-nxml/dist/*.tar\") #'string>)))"
install-oni-org:
emacs --batch \
--load oni-package.el \
--funcall package-initialize \
--eval '(package-refresh-contents)' \
$(foreach DEP,$(DEPS),--eval "(package-install-file \"$(DEP).el\")") \
--eval "(package-install-file (car (sort (file-expand-wildcards \"oni-org/dist/*.tar\") #'string>)))"
install-oni-php:
emacs --batch \
--load oni-package.el \
--funcall package-initialize \
--eval '(package-refresh-contents)' \
$(foreach DEP,$(DEPS),--eval "(package-install-file \"$(DEP).el\")") \
--eval "(package-install-file (car (sort (file-expand-wildcards \"oni-php/dist/*.tar\") #'string>)))"
install-oni-python:
emacs --batch \
--load oni-package.el \
--funcall package-initialize \
--eval '(package-refresh-contents)' \
$(foreach DEP,$(DEPS),--eval "(package-install-file \"$(DEP).el\")") \
--eval "(package-install-file (car (sort (file-expand-wildcards \"oni-python/dist/*.tar\") #'string>)))"
install-oni-ruby:
emacs --batch \
--load oni-package.el \
--funcall package-initialize \
--eval '(package-refresh-contents)' \
$(foreach DEP,$(DEPS),--eval "(package-install-file \"$(DEP).el\")") \
--eval "(package-install-file (car (sort (file-expand-wildcards \"oni-ruby/dist/*.tar\") #'string>)))"
install-oni-twig:
emacs --batch \
--load oni-package.el \
--funcall package-initialize \
--eval '(package-refresh-contents)' \
$(foreach DEP,$(DEPS),--eval "(package-install-file \"$(DEP).el\")") \
--eval "(package-install-file (car (sort (file-expand-wildcards \"oni-twig/dist/*.tar\") #'string>)))"
test-%: install-% test-%: install-%
emacs --batch \ emacs --batch \
@ -159,12 +71,5 @@ test-%: install-%
--eval "(setq ert-batch-backtrace-right-margin nil)" \ --eval "(setq ert-batch-backtrace-right-margin nil)" \
--funcall ert-run-tests-batch-and-exit --funcall ert-run-tests-batch-and-exit
test-oni-bookmark: DEPS := oni-data-dir
test-oni-conf: DEPS := oni-yasnippet
test-oni-css: DEPS := oni-company oni-fci
test-oni-php: DEPS := oni-flycheck oni-company oni-fci
test-oni-elisp: DEPS := oni-company oni-flycheck oni-paredit oni-fci \
oni-yasnippet
clean: clean:
rm -fv $(FILES) rm -fv $(FILES)