Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: tests

on:
push:
branches:
- master
pull_request:
schedule:
- cron: "0 0 * * SUN"

jobs:
tests:
strategy:
fail-fast: false # Let the workflow continue as much as possible
matrix:
include:
- os: ubuntu-latest
lisp: sbcl-bin
defaults:
run:
shell: lispsh -eo pipefail {0}
env:
LISP: ${{ matrix.lisp }}
name: test with ${{ matrix.lisp }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
# The repo already contains the qlot and qlot.lock files, and since
# we don't want those to interfere with the current test run, we
# clone the repository somewhere else (i.e. something different from
# the default './')
path: run-tests
- uses: 40ants/setup-lisp@v2
with:
asdf-system: cl-info
- name: Call run-tests
uses: ./run-tests/
with:
verbose: true
asdf-system: log4cl-extras

10 changes: 9 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ inputs:
coveralls-token:
description: Set this token to upload code coverage results to Coveralls
required: false
verbose:
description: Set this to "true" to get more verbose output about ASDF registry, Qlot version, etc.
required: false

runs:
using: composite
Expand All @@ -27,8 +30,13 @@ runs:
- name: Run Tests
shell: lispsh -eo pipefail {0}
run: |
qlot exec ${{ github.action_path }}/run-tests.ros ${{ inputs.asdf-system }} <<EOF
echo '::group::Running tests'

CL_SOURCE_REGISTRY=`pwd`/ qlot exec ${{ github.action_path }}/run-tests.ros ${{ inputs.asdf-system }} <<EOF
${{ inputs.run-tests }}
EOF

echo '::endgroup::'
env:
COVERALLS_REPO_TOKEN: "${{ inputs.coveralls-token }}"
VERBOSE: "${{ inputs.verbose }}"
6 changes: 6 additions & 0 deletions changelog.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@

(defchangelog (:ignore-words ("CLISP"
"CFFI"
"ASDF"
"CL_SOURCE_REGISTRY"
"FFI"))
(2.3.0 2024-02-03
"
* Separate \"verbose\" input was added to output additional information about ASDF registry and Qlot.
* Now action can work with latest Qlot, which does not set CL_SOURCE_REGISTRY to the current directory.")
(2.2.0 2024-01-30 "
* Shell, used to run all commands was changed from bash to `lispsh -eo pipefail {0}`. This fixes runner for Windows.
* Documentation builder workflow switched from `actions/checkout@v3` to `v4` version.")
Expand Down
33 changes: 32 additions & 1 deletion run-tests.ros
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,42 @@ exec ros -Q -- $0 "$@"


(defun main (&rest args)
(let ((system (first args)))
(let ((system (first args))
(verbose (string-equal (or (uiop:getenv "VERBOSE")
"")
"true")))
(format t "::group::Running tests for ASDF system ~S~%"
(or system
""))

(when verbose
(format t "Qlot dir:~%~A~%" (ql:where-is-system :qlot))
(format t "Qlot version:~%~A~%"
(uiop:run-program "qlot --version"
:output '(:string :stripped t)
:error-output :output
:ignore-error-status t))

(format t "Current directory:~%~A~%" (uiop:getcwd))
(format t "Current directory content:~%~A~%"
(directory (merge-pathnames "*.*" (uiop:getcwd))))

(format t "Known quicklisp dists:~%~A~%" (ql-dist:all-dists))
(format t "ASDF central registry:~%~A~%" asdf:*central-registry*)
(format t "CL_SOURCE_REGISTRY:~%~A~%" (uiop:getenv "CL_SOURCE_REGISTRY"))
(format t "ASDF default source registries:~%~A~%"
asdf/source-registry:*default-source-registries*)

(format t "ASDF source registries:~%")
(loop for registry in asdf/source-registry:*default-source-registries*
for content = (funcall registry)
do (format t "~A:~%~A~%"
registry
(if content
content
"Empty"))))


;; Without this random state initialization
;; subsequent runs of the script will generate the same
;; "random" temprorary directory for coverage data:
Expand Down