diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..278633bdf25ceb8564a57d5fecd88dbc1dac8506 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,27 @@ +include: + project: 'clci/gitlab-ci' + ref: release/v2-dev + file: + - definitions.gitlab-ci.yml + - test-pipeline.gitlab-ci.yml + +variables: + CLCI_INSTALL_QUICKLISP_CLIENT: "yes" + # Off by default because it's proprietary and has a separate license. + CLCI_TEST_ALLEGRO: "yes" + # Off by default because the Docker image is a bit out of date, due to + # upstream churn. + CLCI_TEST_CLASP: "yes" + # Alexandria is a non-commercial project, so we can use the express version + # of Allegro for testing. + I_AGREE_TO_ALLEGRO_EXPRESS_LICENSE: "yes" + +# This section is not strictly required, but prevents Gitlab CI from launching +# multiple redundent pipelines when a Merge Request is opened. +workflow: + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + - if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS' + when: never + - if: '$CI_COMMIT_BRANCH' + - if: '$CI_COMMIT_TAG' diff --git a/alexandria-tests.asd b/alexandria-tests.asd index 6b785d3557ad681782d597e5fb9e64a08458322e..c21142493cc26e2089b6980640bc4721780e9be3 100644 --- a/alexandria-tests.asd +++ b/alexandria-tests.asd @@ -6,7 +6,11 @@ :components ((:file "alexandria-1/tests") (:file "alexandria-2/tests")) :perform (test-op (o c) - (flet ((run-tests (&rest args) - (apply (intern (string '#:run-tests) '#:alexandria-tests) args))) - (run-tests :compiled nil) - (run-tests :compiled t)))) + (let ((unexpected-failure-p nil)) + (flet ((run-tests (&rest args) + (unless (apply (intern (string '#:run-tests) '#:alexandria-tests) args) + (setf unexpected-failure-p t)))) + (run-tests :compiled nil) + (run-tests :compiled t)) + (when unexpected-failure-p + (error "Unexpected test failure"))))) diff --git a/scripts/ci-test.lisp b/scripts/ci-test.lisp new file mode 100644 index 0000000000000000000000000000000000000000..7dd38003ecc69fa90c7c8042757ac9c867472fbb --- /dev/null +++ b/scripts/ci-test.lisp @@ -0,0 +1,5 @@ +;; Install all the deps +(ql:quickload "alexandria-tests") + +;; Run the tests! +(asdf:test-system "alexandria")