diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..ee63e62 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,69 @@ +# * test.yml --- Test Emacs packages using makem.sh on GitHub Actions + +# https://github.com/alphapapa/makem.sh + +# Based on Steve Purcell's examples at +# , +# . + +# * License: + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# * Code: + +name: "CI" +on: + pull_request: + push: + branches: + - master + - develop + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + emacs_version: + - 26.3 + - snapshot + steps: + - uses: purcell/setup-emacs@master + with: + version: ${{ matrix.emacs_version }} + + - uses: actions/checkout@v2 + + - name: Initialize sandbox + run: | + SANDBOX_DIR=$(mktemp -d) || exit 1 + echo ::set-env name=SANDBOX_DIR::$SANDBOX_DIR + ./makem.sh -vv --sandbox $SANDBOX_DIR --install-deps --install-linters + + # The "all" rule is not used, because it treats compilation warnings + # as failures, so linting and testing are run as separate steps. + + - name: Lint + continue-on-error: true + run: ./makem.sh -vv --sandbox $SANDBOX_DIR lint + + - name: Test + if: always() # Run test even if linting fails. + run: ./makem.sh -vv --sandbox $SANDBOX_DIR test + +# Local Variables: +# eval: (outline-minor-mode) +# End: diff --git a/org-roam.el b/org-roam.el index 517b4c7..d8e89d7 100644 --- a/org-roam.el +++ b/org-roam.el @@ -6,7 +6,7 @@ ;; URL: https://github.com/jethrokuan/org-roam ;; Keywords: org-mode, roam, convenience ;; Version: 0.1.0 -;; Package-Requires: ((emacs "25.1") (dash "2.13") (f "0.17.2") (s "1.12.0") (async "1.9.4")) +;; Package-Requires: ((emacs "26.1") (dash "2.13") (f "0.17.2") (s "1.12.0") (async "1.9.4")) ;; This file is NOT part of GNU Emacs. diff --git a/tests/test-org-roam.el b/tests/test-org-roam.el new file mode 100644 index 0000000..21d779c --- /dev/null +++ b/tests/test-org-roam.el @@ -0,0 +1,35 @@ +;;; test-org-roam.el --- Tests for org-roam -*- lexical-binding: t; -*- + +;; Copyright (C) 2020 Jethro Kuan + +;; Author: Jethro Kuan +;; Package-Requires: ((buttercup)) + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; + +;;; Code: + +;;;; Requirements + +(require 'buttercup) +(require 'org-roam) + +;;; Tests +(describe "Org-roam cache" + (it "Mock Test" + (expect t :to-be t)))