Skip to content

feat: emacs tests #291

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

Open
wants to merge 10 commits into
base: main
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
119 changes: 119 additions & 0 deletions .github/workflows/emacs-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: Emacs Plugin CI

on:
push:
paths:
- Eask
- rustowl.el
- emacs-tests/
- .github/workflows/emacs-checks.yml
branches:
- main
pull_request:
paths:
- Eask
- rustowl.el
- emacs-tests/
- .github/workflows/emacs-checks.yml

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Emacs
uses: jcs090218/setup-emacs@master
with:
version: 28.1

- name: Set up Eask (snapshot)
uses: emacs-eask/setup-eask@master
with:
version: 'snapshot'

- name: Setup Rustowl
run: |
./scripts/build/toolchain cargo build --release
./scripts/build/toolchain cargo install --path . --locked

- name: Lint Regexps
run: eask lint regexps

- name: Lint Package
run: eask lint package

- name: Lint License
run: eask lint license

- name: Lint Keywords
run: eask lint keywords

- name: Lint Indent
run: eask lint indent

- name: Lint Checkdocs
run: eask lint checkdoc

- name: Lint Declare
run: eask lint declare

- name: Lint elisp-lint
run: eask lint elisp-lint

test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Emacs
uses: jcs090218/setup-emacs@master
with:
version: 28.1

- name: Set up Eask (snapshot)
uses: emacs-eask/setup-eask@master
with:
version: 'snapshot'

- name: Setup Rustowl
run: |
./scripts/build/toolchain cargo build --release
./scripts/build/toolchain cargo install --path . --locked

- name: Run Tests
run: |
eask install-deps
eask run script test

build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Emacs
uses: jcs090218/setup-emacs@master
with:
version: 28.1

- name: Setup Rustowl
run: |
./scripts/build/toolchain cargo build --release
./scripts/build/toolchain cargo install --path . --locked

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

- name: Build And Compile
run: |
eask package
eask install
eask compile
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ completions/
man/
memory-bank/
security-logs/
benchmark-summary.*
benchmark-summary.*
.eask/
20 changes: 20 additions & 0 deletions Eask
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
;; -*- mode: eask; lexical-binding: t -*-

(package "rustowl"
"0.3.4"
"Visualize Ownership and Lifetimes in Rust")

(website-url "https://github.com/cordx56/rustowl")
(keywords "lifetime" "ownership" "rust" "visualization" "tools")

(package-file "rustowl.el")

(script "test" "eask test ert emacs-tests/rustowl-test.el")

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

(depends-on "emacs" "28.1")
(depends-on "lsp-mode" "9.0.0")

(setq network-security-level 'low) ; see https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-932956432
Loading
Loading