Skip to content

Commit

Permalink
ci: setup CI builds with Eask
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuco1 committed Mar 5, 2023
1 parent 1d5cd5e commit 8a80c6e
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 21 deletions.
89 changes: 70 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,92 @@
name: CI
on: [push]
name: test

on:
push:
branches:
- master
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
UNDERCOVER_CONFIG: "(\"smartparens.el\" \"smartparens-*.el\" (:report-format lcov) (:send-report nil))"

jobs:
build:
runs-on: ubuntu-latest
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
emacs_version:
os:
- ubuntu-latest
- macos-latest
- windows-latest
emacs-version:
- '25.1'
- '25.2'
- '25.3'
- '26.1'
- '26.2'
- '26.3'
- '27.1'
- '27.2'
- '28.1'
- '28.2'
- 'snapshot'
include:
- emacs_version: 'snapshot'
- emacs-version: 'snapshot'
allow_failure: true
steps:
- uses: actions/checkout@v1
- uses: purcell/setup-emacs@master
- uses: jcs090218/setup-emacs@master
with:
version: ${{ matrix.emacs-version }}

# Remove expired DST Root CA X3 certificate. Workaround for
# https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51038 bug on Emacs 27.2.
# https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-1126671598
- name: Workaround for Emacs 27.2's Windows build from GNU FTP
if: ${{ runner.os == 'Windows' && matrix.emacs-version == '27.2' }}
run: |
gci cert:\LocalMachine\Root\DAC9024F54D8F6DF94935FB1732638CA6AD77C13
gci cert:\LocalMachine\Root\DAC9024F54D8F6DF94935FB1732638CA6AD77C13 | Remove-Item
- uses: emacs-eask/setup-eask@master
with:
version: ${{ matrix.emacs_version }}
- uses: actions/[email protected]
- uses: conao3/setup-cask@master
version: 'snapshot'

- uses: actions/checkout@v3

- name: Install dependencies
run: 'cask install'
run: 'eask install-deps --dev'

- name: Run tests
if: matrix.allow_failure != true
- name: Run ERT tests
run: |
cask exec ert-runner --reporter ert+duration
eask exec ert-runner --reporter ert+duration
cask exec emacs --eval "(setq byte-compile-error-on-warn t)" -L . --batch -f batch-byte-compile smartparens.el smartparens-*[^pkg].el
- name: Run tests (allow failure)
if: matrix.allow_failure == true
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: emacs-${{ matrix.emacs-version }}
parallel: true

- name: Test installation and compilation
run: |
cask exec ert-runner --reporter ert+duration || true
cask exec emacs --eval "(setq byte-compile-error-on-warn t)" -L . --batch -f batch-byte-compile smartparens.el smartparens-*[^pkg].el || true
eask clean all
eask package
eask install
eask compile
finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ elpa
*~*
docs/_build
.dir-locals-2.el
/.eask
/.elsa
41 changes: 41 additions & 0 deletions Eask
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
(package "smartparens" "1.11.0"
"Automatic insertion, wrapping and paredit-like navigation with user defined pairs.")

(website-url "https://github.com/Fuco1/smartparens")
(keywords "abbrev" "convenience" "editing")

(package-file "smartparens.el")

(files "smartparens.el" "smartparens-*.el")

(script "test" "echo \"Error: no test specified\" && exit 1")

(source "gnu")
(source "melpa")

(depends-on "cl-lib" "0.3")
(depends-on "dash" "2.13.0")

(development
(depends-on "elsa")
(depends-on "f")
(depends-on "ert-runner")
(depends-on "undercover")
(depends-on "shut-up")
(depends-on "racket-mode")
(depends-on "scala-mode")
(depends-on "rust-mode")
(depends-on "swift-mode")
(depends-on "auctex")
(depends-on "clojure-mode")
(depends-on "lua-mode")
(depends-on "js2-mode")
(depends-on "ess")
(depends-on "tuareg")
(depends-on "elixir-mode")
(depends-on "haskell-mode")
(depends-on "markdown-mode")
(depends-on "hungry-delete")
(depends-on "evil")
(depends-on "crystal-mode")
(depends-on "go-mode"))
3 changes: 1 addition & 2 deletions test/test-helper.el
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@

;;; Code:

;; (when (require 'undercover nil t)
;; (undercover "smartparens*.el"))
(when (require 'undercover nil t) (undercover))

(require 'ert)
(require 'dash)
Expand Down

0 comments on commit 8a80c6e

Please sign in to comment.