Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add downstream test for Eask #250

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .elpaignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.bumpversion.cfg
.eask
.elpaignore
.github
Makefile
Expand Down
80 changes: 80 additions & 0 deletions .github/workflows/test-eask.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Test downstream Eask

permissions:
actions: read
checks: read
contents: read
deployments: none
id-token: none
issues: read
discussions: none
packages: none
pages: none
pull-requests: read
repository-projects: read
security-events: read
statuses: read

on:
pull_request:
push:
branches:
- 'master'
- '*'
paths-ignore:
- 'bin/*'
- 'docs/images/*'
- 'docs/running-tests.md'
- 'scripts'

jobs:
build:
name: Build and test
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
emacs-version:
- 26.3
- 27.2
- 28.2
- 29.4
experimental: [false]
include:
- os: ubuntu-latest
emacs-version: snapshot
experimental: true
- os: macos-latest
emacs-version: snapshot
experimental: true
# TODO: There is an upstream error on windows, ignore it for now.
#- os: windows-latest
# emacs-version: snapshot
# experimental: true
exclude:
- os: macos-latest
emacs-version: 26.3
- os: macos-latest
emacs-version: 27.2

steps:
- uses: jcs090218/setup-emacs@master
with:
version: ${{ matrix.emacs-version }}

- uses: emacs-eask/setup-eask@master
with:
version: 'snapshot'

- uses: actions/checkout@v4

- name: Generate Eask-file to link
run: eask init --from source buttercup.el

- name: Test downstream Eask
working-directory: ./tests/fixtures/SampleElispProject/
run: |
eask link add buttercup ../../../
eask test buttercup
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
# ELPA-generated files
/buttercup-autoloads.el
/buttercup-pkg.el

# Eask generated
/.eask
5 changes: 5 additions & 0 deletions tests/fixtures/SampleElispProject/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.elc
/dist

# Eask generated
/.eask
14 changes: 14 additions & 0 deletions tests/fixtures/SampleElispProject/Eask
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
(package "SampleElispProject"
"0.0.1"
"Sample elis project")

(website-url "https://github.com/jorgenschaefer/emacs-buttercup")
(keywords "test")

(package-file "SampleElispProject.el")

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

(source 'gnu)

(depends-on "emacs" "26.3")
37 changes: 37 additions & 0 deletions tests/fixtures/SampleElispProject/SampleElispProject.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
;;; SampleElispProject.el --- Sample elis project -*- lexical-binding: t; -*-

;; Copyright (C) 2024 Shen, Jen-Chieh

;; Author: Shen, Jen-Chieh <[email protected]>
;; Maintainer: Shen, Jen-Chieh <[email protected]>
;; URL: https://github.com/jorgenschaefer/emacs-buttercup
;; Version: 0.0.1
;; Package-Requires: ((emacs "26.1"))
;; Keywords: test

;; This file is not part of GNU Emacs.

;; 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 <https://www.gnu.org/licenses/>.

;;; Commentary:
;;
;;
;;

;;; Code:



(provide 'SampleElispProject)
;;; SampleElispProject.el ends here
5 changes: 5 additions & 0 deletions tests/fixtures/SampleElispProject/test/buttercup-test.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
;;; lexical-binding is required -*- lexical-binding: t; -*-

(describe "A suite"
(it "contains a spec with an expectation"
(expect t :to-be t)))
Loading