diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..96ee3cb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,74 @@ +{ + "name": "CI", + "on": { + "push": { + "branches": [ + "master" + ] + }, + "pull_request": null, + "schedule": [ + { + "cron": "0 10 * * 1" + } + ] + }, + "jobs": { + "run-tests": { + "runs-on": "ubuntu-latest", + "env": { + "OS": "ubuntu-latest", + "QUICKLISP_DIST": "quicklisp", + "LISP": "sbcl-bin" + }, + "steps": [ + { + "name": "Checkout Code", + "uses": "actions/checkout@v3" + }, + { + "name": "Grant All Perms to Make Cache Restoring Possible", + "run": "sudo mkdir -p /usr/local/etc/roswell\n sudo chown \"${USER}\" /usr/local/etc/roswell\n # Here the ros binary will be restored:\n sudo chown \"${USER}\" /usr/local/bin", + "shell": "bash" + }, + { + "name": "Get Current Month", + "id": "current-month", + "run": "echo \"value=$(date -u \"+%Y-%m\")\" >> $GITHUB_OUTPUT", + "shell": "bash" + }, + { + "name": "Cache Roswell Setup", + "id": "cache", + "uses": "actions/cache@v3", + "with": { + "path": "qlfile\nqlfile.lock\n~/.cache/common-lisp/\n~/.roswell\n/usr/local/etc/roswell\n/usr/local/bin/ros\n/usr/local/Cellar/roswell\n.qlot", + "key": "a-${{ steps.current-month.outputs.value }}-${{ env.cache-name }}-ubuntu-latest-quicklisp-sbcl-bin-${{ hashFiles('qlfile.lock', '*.asd') }}" + } + }, + { + "name": "Restore Path To Cached Files", + "run": "echo $HOME/.roswell/bin >> $GITHUB_PATH\n echo .qlot/bin >> $GITHUB_PATH", + "shell": "bash", + "if": "steps.cache.outputs.cache-hit == 'true'" + }, + { + "name": "Setup Common Lisp Environment", + "uses": "40ants/setup-lisp@v2", + "with": { + "asdf-system": "commondoc-markdown" + }, + "if": "steps.cache.outputs.cache-hit != 'true'" + }, + { + "name": "Run Tests", + "uses": "40ants/run-tests@v2", + "with": { + "asdf-system": "commondoc-markdown", + "coveralls-token": "${{ secrets.github_token }}" + } + } + ] + } + } +} \ No newline at end of file diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0b9f37b..70da21f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -19,7 +19,7 @@ "steps": [ { "name": "Checkout Code", - "uses": "actions/checkout@v1" + "uses": "actions/checkout@v3" }, { "name": "Grant All Perms to Make Cache Restoring Possible", @@ -29,16 +29,16 @@ { "name": "Get Current Month", "id": "current-month", - "run": "echo \"::set-output name=value::$(date -u \"+%Y-%m\")\"", + "run": "echo \"value=$(date -u \"+%Y-%m\")\" >> $GITHUB_OUTPUT", "shell": "bash" }, { "name": "Cache Roswell Setup", "id": "cache", - "uses": "actions/cache@v2", + "uses": "actions/cache@v3", "with": { - "path": "qlfile\n qlfile.lock\n /usr/local/bin/ros\n ~/.cache/common-lisp/\n ~/.roswell\n /usr/local/etc/roswell\n .qlot", - "key": "${{ steps.current-month.outputs.value }}-${{ env.cache-name }}-ubuntu-latest-quicklisp-sbcl-bin-${{ hashFiles('qlfile.lock', '*.asd') }}" + "path": "qlfile\nqlfile.lock\n~/.cache/common-lisp/\n~/.roswell\n/usr/local/etc/roswell\n/usr/local/bin/ros\n/usr/local/Cellar/roswell\n.qlot", + "key": "a-${{ steps.current-month.outputs.value }}-${{ env.cache-name }}-ubuntu-latest-quicklisp-sbcl-bin-${{ hashFiles('qlfile.lock', '*.asd') }}" } }, { @@ -49,7 +49,7 @@ }, { "name": "Setup Common Lisp Environment", - "uses": "40ants/setup-lisp@v1", + "uses": "40ants/setup-lisp@v2", "with": { "asdf-system": "commondoc-markdown-docs" }, diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index ce4708b..36f8d02 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -14,7 +14,7 @@ "steps": [ { "name": "Checkout Code", - "uses": "actions/checkout@v1" + "uses": "actions/checkout@v3" }, { "name": "Grant All Perms to Make Cache Restoring Possible", @@ -24,16 +24,16 @@ { "name": "Get Current Month", "id": "current-month", - "run": "echo \"::set-output name=value::$(date -u \"+%Y-%m\")\"", + "run": "echo \"value=$(date -u \"+%Y-%m\")\" >> $GITHUB_OUTPUT", "shell": "bash" }, { "name": "Cache Roswell Setup", "id": "cache", - "uses": "actions/cache@v2", + "uses": "actions/cache@v3", "with": { - "path": "qlfile\n qlfile.lock\n /usr/local/bin/ros\n ~/.cache/common-lisp/\n ~/.roswell\n /usr/local/etc/roswell\n .qlot", - "key": "${{ steps.current-month.outputs.value }}-${{ env.cache-name }}-ubuntu-latest-quicklisp-sbcl-bin-${{ hashFiles('qlfile.lock', '*.asd') }}" + "path": "qlfile\nqlfile.lock\n~/.cache/common-lisp/\n~/.roswell\n/usr/local/etc/roswell\n/usr/local/bin/ros\n/usr/local/Cellar/roswell\n.qlot", + "key": "a-${{ steps.current-month.outputs.value }}-${{ env.cache-name }}-ubuntu-latest-quicklisp-sbcl-bin-${{ hashFiles('qlfile.lock', '*.asd') }}" } }, { @@ -44,25 +44,25 @@ }, { "name": "Setup Common Lisp Environment", - "uses": "40ants/setup-lisp@v1", + "uses": "40ants/setup-lisp@v2", "with": { "asdf-system": "commondoc-markdown" }, "if": "steps.cache.outputs.cache-hit != 'true'" }, { - "name": "Change dist to Ultralisp", - "run": "echo 'dist ultralisp http://dist.ultralisp.org' > qlfile", + "name": "Change dist to Ultralisp if qlfile does not exist", + "run": "if [[ ! -e qlfile ]]; then echo 'dist ultralisp http://dist.ultralisp.org' > qlfile; fi", "shell": "bash" }, { "name": "Update Qlot", - "run": "qlot update || qlot update", + "run": "qlot update --no-deps", "shell": "bash" }, { "name": "Install SBLint wrapper", - "run": "qlot exec ros install 40ants-linter", + "run": "qlot exec ros install 40ants-asdf-system 40ants-linter", "shell": "bash" }, { diff --git a/qlfile.lock b/qlfile.lock index c8fdf82..e3febc8 100644 --- a/qlfile.lock +++ b/qlfile.lock @@ -1,8 +1,8 @@ ("quicklisp" . (:class qlot/source/dist:source-dist :initargs (:distribution "http://beta.quicklisp.org/dist/quicklisp.txt" :%version :latest) - :version "2021-12-30")) + :version "2023-02-15")) ("ultralisp" . (:class qlot/source/dist:source-dist :initargs (:distribution "http://dist.ultralisp.org" :%version :latest) - :version "20220122215001")) + :version "20230503192000")) diff --git a/src/ci.lisp b/src/ci.lisp index 9808836..92c470b 100644 --- a/src/ci.lisp +++ b/src/ci.lisp @@ -13,14 +13,13 @@ :cache t :jobs ((40ants-ci/jobs/linter:linter))) -;; There is no tests yet -;; (defworkflow ci -;; :on-push-to "master" -;; :by-cron "0 10 * * 1" -;; :on-pull-request t -;; :cache t -;; :jobs ((40ants-ci/jobs/run-tests:run-tests -;; :coverage t))) +(defworkflow ci + :on-push-to "master" + :by-cron "0 10 * * 1" + :on-pull-request t + :cache t + :jobs ((40ants-ci/jobs/run-tests:run-tests + :coverage t))) (defworkflow docs :on-push-to "master" diff --git a/t/core.lisp b/t/core.lisp index 3145daf..8cae17a 100644 --- a/t/core.lisp +++ b/t/core.lisp @@ -320,7 +320,6 @@ the breaked line. "This is the breaked line. - ")) (ok (equal html "

This is
the breaked line.

")))))