-
Notifications
You must be signed in to change notification settings - Fork 15
69 lines (60 loc) · 2.15 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: CI
on:
push:
branches:
- master
pull_request_target:
types:
- opened
- synchronize
- reopened
permissions:
contents: read
issues: write
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Install dependencies
run: sudo apt install -y sbcl libgirepository1.0-dev libgtk-3-dev xvfb
- name: Install Quicklisp
run: |
curl -O https://beta.quicklisp.org/quicklisp.lisp &&
sbcl \
--load quicklisp.lisp \
--eval '(quicklisp-quickstart:install)' \
--quit
echo '(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))' > $HOME/.sbclrc
- name: Add system to Quicklisp catalog
run: |
ln -s $(pwd) ~/quicklisp/local-projects/cl-gobject-introspection &&
rm -f ~/quicklisp/local-projects/system-index.txt
- name: Run tests
run: |
sbcl \
--eval '(require :sb-cover)' \
--eval '(declaim (optimize sb-cover:store-coverage-data))' \
--eval '(ql:quickload :fiveam)' \
--eval '(ql:quickload :cl-gobject-introspection)' \
--eval '(setf fiveam:*on-error* :backtrace fiveam:*on-failure* :backtrace)' \
--eval '(setf *debugger-hook* (lambda (c h) (declare (ignore h)) (princ c) (uiop:quit -1)))' \
--eval '(asdf:test-system :cl-gobject-introspection)' \
--eval '(sb-cover:report "coverage/" :if-matches (lambda (f) (eq 0 (search (namestring (asdf:system-relative-pathname :cl-gobject-introspection "src/")) f))))' \
--quit
- uses: actions/upload-artifact@v3
with:
name: coverage
path: coverage
retention-days: 14
- uses: actions/github-script@v6
with:
script: |
await require('./.github/coverage-report.js')({github, context, coveragePath: "./coverage"});