-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Close #43: Fix tests and run in GitHub action
* README.md: updated for GitHub Actions badge * .github/workflows/build-and-test.yml: Added workflow * hunchensocket-tests.asd: Extracted from main .asd file to appease ASDF * hunchensocket-tests.lisp: Fix test for binary messages without temp files * hunchensocket.asd: Extracted test system * run-tests.lisp: Test run script for CI
- Loading branch information
1 parent
9f80124
commit dcc0b38
Showing
6 changed files
with
61 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: 'Build and Test' | ||
on: | ||
- workflow_dispatch | ||
- push | ||
|
||
jobs: | ||
install-quicklisp: | ||
strategy: | ||
matrix: | ||
implementation: ['sbcl'] | ||
os: ['ubuntu-latest', 'macos-latest'] | ||
runs-on: '${{ matrix.os }}' | ||
name: 'Install Common Lisp' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: 'Install MacPorts' | ||
if: runner.os == 'macOS' | ||
uses: melusina-org/setup-macports@v1 | ||
|
||
- uses: melusina-org/setup-common-lisp@v1 | ||
with: | ||
implementation: '${{ matrix.implementation }}' | ||
|
||
- uses: melusina-org/setup-quicklisp@v1 | ||
id: 'quicklisp' | ||
with: | ||
implementation: '${{ matrix.implementation }}' | ||
|
||
- name: 'Validate installed implementation' | ||
run: | | ||
test -d '${{ steps.quicklisp.outputs.quicklisp-home }}' | ||
test -d '${{ steps.quicklisp.outputs.quicklisp-local-projects }}' | ||
- name: 'Run tests' | ||
run: | | ||
sbcl --load run-tests.lisp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
(asdf:defsystem :hunchensocket-tests | ||
:description "Tests for Hunchensocket" | ||
:version #.(with-open-file (f "VERSION") (string (read f))) | ||
:depends-on (:fiasco | ||
:hunchensocket) | ||
:serial t | ||
:components | ||
((:file "hunchensocket-tests"))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
;; -*- Lisp -*- | ||
|
||
(ql:quickload :hunchensocket-tests) | ||
(handler-case | ||
(unless (fiasco:run-package-tests :package :hunchensocket-tests) | ||
(error "test(s) failed")) | ||
(error (e) | ||
(format t ";; ~A~%" e) | ||
(sb-ext:exit :code 1))) | ||
(sb-ext:exit :code 0) |