Skip to content

Commit

Permalink
Merge pull request #7 from 40ants/fix-newline
Browse files Browse the repository at this point in the history
Updated qlfile and added a workflow to run tests on CI
  • Loading branch information
svetlyak40wt committed May 4, 2023
2 parents cb070f6 + b95c3da commit f501b41
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 27 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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 }}"
}
}
]
}
}
}
12 changes: 6 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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') }}"
}
},
{
Expand All @@ -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"
},
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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') }}"
}
},
{
Expand All @@ -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"
},
{
Expand Down
4 changes: 2 additions & 2 deletions qlfile.lock
Original file line number Diff line number Diff line change
@@ -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"))
15 changes: 7 additions & 8 deletions src/ci.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion t/core.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ the breaked line.
"This is
the breaked line.
"))
(ok (equal html
"<p>This is<br/>the breaked line.</p>")))))

0 comments on commit f501b41

Please sign in to comment.