# @file test.yml
---
name: Tests

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  test:
    runs-on: ubuntu-latest
    
    steps:
      - name: Download sbcl
        run: sudo apt install sbcl

      - name: Download quicklisp
        run: curl -o quicklisp.lisp 'https://beta.quicklisp.org/quicklisp.lisp'
                          
                        
      - name: Install quicklisp
        run: |
          sbcl --noinform --non-interactive --load quicklisp.lisp --eval "(quicklisp-quickstart:install :path \"$GITHUB_WORKSPACE/quicklisp/\")"
          sbcl --noinform --non-interactive --load "$GITHUB_WORKSPACE/quicklisp/setup.lisp" --eval '(ql-util:without-prompting (ql:add-to-init-file))'

      - name: Download repo
        uses: actions/checkout@v2
        with:
          path: quicklisp/local-projects/cl-protobufs

      - name: Load and run tests
        run: |
          ! sbcl --noinform --non-interactive --eval '(ql:quickload "clunit2")' --eval '(setf clunit:*clunit-report-format* :tap)' --eval '(ql:quickload :cl-protobufs)' --eval '(asdf:test-system :cl-protobufs)' | grep -q "not ok"

Add CI workflow via GitHub Actions
Add CI workflow via GitHub Actions
