This is a template for a Common Lisp project using Ocicl for package management, Lisp-Unit2 as testing framework and Check-It as property testing library.
1# SPDX-FileCopyrightText: Copyright 2024 Roland Csaszar
2# SPDX-License-Identifier: MIT
3#
4# Project: CommonLisp-Template
5# File: test.yml
6# Date: 01.Jul.2024
7#
8# ==============================================================================
9
10name: Test
11
12on:
13 push:
14 branches: ["main"]
15 pull_request:
16 branches: ["main"]
17
18jobs:
19 tests:
20 strategy:
21 matrix:
22 os: [ubuntu-latest, macos-latest]
23
24 runs-on: ${{ matrix.os }}
25
26 steps:
27 - name: Checkout
28 uses: actions/checkout@v3
29
30 - name: Setup SBCL Linux
31 if: runner.os == 'Linux'
32 run: |
33 eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
34 brew install sbcl
35
36 - name: Setup SBCL Linux
37 if: runner.os != 'Linux'
38 run: |
39 brew install sbcl
40
41 - name: Setup Ocicl Linux
42 if: runner.os == 'Linux'
43 run: |
44 eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
45 brew install ocicl
46 echo '(require "asdf")' >> ~/.sbclrc
47 ocicl setup >> ~/.sbclrc
48
49 - name: Setup Ocicl
50 if: runner.os != 'Linux'
51 run: |
52 brew install ocicl
53 echo '(require "asdf")' >> ~/.sbclrc
54 ocicl setup >> ~/.sbclrc
55
56 - name: Run Tests Linux
57 if: runner.os == 'Linux'
58 run: |
59 eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
60 sbcl --non-interactive --eval '(asdf:load-system :commonlisp-template/test)' --eval '(commonlisp-template/test:run-tests-exit)'
61
62 - name: Run Tests
63 if: runner.os != 'Linux'
64 run: |
65 sbcl --non-interactive --eval '(asdf:load-system :commonlisp-template/test)' --eval '(commonlisp-template/test:run-tests-exit)'
66
67 tests-windows:
68 runs-on: windows-latest
69
70 steps:
71 - name: Checkout
72 uses: actions/checkout@v3
73
74 - name: Setup SBCL
75 run: |
76 choco install sbcl
77
78 - name: Setup Ocicl
79 run: |
80 curl -L -O "https://github.com/ocicl/ocicl/archive/refs/tags/v2.3.7.zip"
81 7z x v2.3.7.zip
82 cd ocicl-2.3.7
83 sbcl --load setup.lisp
84 echo '(require "asdf")' >> C:\Users\runneradmin\.sbclrc
85 C:\Users\runneradmin\AppData\Local\ocicl\bin\ocicl.exe setup >> C:\Users\runneradmin\.sbclrc
86
87 - name: Run Tests
88 run: |
89 $env:Path += ';C:\Users\runneradmin\AppData\Local\ocicl\bin\'
90 sbcl --non-interactive --eval '(asdf:load-system :commonlisp-template/test)' --eval '(commonlisp-template/test:run-tests-exit)'