From ad2ad0ce92e4d5e6ef698e4fb77ac89153eef301 Mon Sep 17 00:00:00 2001 From: JenChieh Date: Mon, 21 Aug 2023 10:12:42 -0700 Subject: [PATCH] test: Add CI --- .github/dependabot.yml | 6 +++++ .github/workflows/test.yml | 52 ++++++++++++++++++++++++++++++++++++++ .gitignore | 3 +++ Eask | 19 ++++++++++++++ Makefile | 33 ++++++++++++++++++++++++ pythonic.el | 2 +- 6 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/test.yml create mode 100644 Eask create mode 100644 Makefile diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..253bcb7 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: daily diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..bbc9581 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,52 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + 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.1 + experimental: [false] + include: + - os: ubuntu-latest + emacs-version: snapshot + experimental: true + - os: macos-latest + emacs-version: snapshot + experimental: true + - os: windows-latest + emacs-version: snapshot + experimental: true + + steps: + - uses: actions/checkout@v3 + + - uses: jcs090218/setup-emacs@master + with: + version: ${{ matrix.emacs-version }} + + - uses: emacs-eask/setup-eask@master + with: + version: 'snapshot' + + - name: Run tests + run: + make ci diff --git a/.gitignore b/.gitignore index 0ef71f7..ac0a176 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ *~ .cask/ +.eask/ +/dist +*.elc .vagrant/ diff --git a/Eask b/Eask new file mode 100644 index 0000000..b9019ea --- /dev/null +++ b/Eask @@ -0,0 +1,19 @@ +(package "pythonic" + "0.2" + "Utility functions for writing pythonic emacs package") + +(website-url "https://github.com/proofit404/pythonic") +(keywords "convenience" "pythonic") + +(package-file "pythonic.el") + +(script "test" "echo \"Error: no test specified\" && exit 1") + +(source 'gnu) +(source 'melpa) + +(depends-on "emacs" "25.1") +(depends-on "s") +(depends-on "f") + +(setq network-security-level 'low) ; see https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-932956432 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e92a368 --- /dev/null +++ b/Makefile @@ -0,0 +1,33 @@ +EMACS ?= emacs +EASK ?= eask + +.PHONY: clean checkdoc lint package install compile test + +ci: clean package install compile + +package: + @echo "Packaging..." + $(EASK) package + +install: + @echo "Installing..." + $(EASK) install + +compile: + @echo "Compiling..." + $(EASK) compile + +test: + @echo "Testing..." + $(EASK) test ert ./test/*.el + +checkdoc: + @echo "Run checkdoc..." + $(EASK) lint checkdoc + +lint: + @echo "Run package-lint..." + $(EASK) lint package + +clean: + $(EASK) clean all diff --git a/pythonic.el b/pythonic.el index 9a7f5cb..a24850b 100644 --- a/pythonic.el +++ b/pythonic.el @@ -1,4 +1,4 @@ -;;; pythonic.el --- Utility functions for writing pythonic emacs package. -*- lexical-binding: t; -*- +;;; pythonic.el --- Utility functions for writing pythonic emacs package -*- lexical-binding: t; -*- ;; Copyright (C) 2015-2021 by Artem Malyshev