aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-05 05:30:32 -0500
committerCraig Jennings <c@cjennings.net>2026-05-05 05:30:32 -0500
commit4414d9e4d3c1a3113e38353e38ec11d6de6ba8d8 (patch)
tree56f80596311f400b13f0675ee8e85d780a696feb /.github/workflows
parent35131cb72c08c657d2a3389338d0c049d57e69bd (diff)
downloademacs-wttrin-4414d9e4d3c1a3113e38353e38ec11d6de6ba8d8.tar.gz
emacs-wttrin-4414d9e4d3c1a3113e38353e38ec11d6de6ba8d8.zip
ci: add github actions for tests, lint, and coverage
Tests run across an Emacs version matrix (26.3, 27.2, 28.2, 29.4, snapshot) on every push to main and every PR. Lint and coverage run once each on the latest stable Emacs. The coverage job runs `make coverage`, prints the per-file and overall percentages via `scripts/coverage-summary.py`, and uploads the simplecov JSON as a build artifact (30-day retention). I'm leaving the artifact-only path in place for now and we'll wire up Coveralls in a follow-up once the repo is registered there. The matrix floor is 26.3 even though Package-Requires says 24.4. The setup-emacs action doesn't reliably support 24.x or early 25.x anymore, and the recent if-let find shows we hadn't actually been testing the stated minimum. Honest CI floor here is more useful than an aspirational one.
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci.yml94
1 files changed, 94 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..8121581
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,94 @@
+name: CI
+
+on:
+ push:
+ branches: [main]
+ pull_request:
+ branches: [main]
+
+jobs:
+ test:
+ name: Test (Emacs ${{ matrix.emacs-version }})
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ emacs-version:
+ - '26.3'
+ - '27.2'
+ - '28.2'
+ - '29.4'
+ - 'snapshot'
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Emacs
+ uses: jcs090218/setup-emacs@master
+ with:
+ version: ${{ matrix.emacs-version }}
+
+ - name: Set up Eask
+ uses: emacs-eask/setup-eask@master
+ with:
+ version: 'snapshot'
+
+ - name: Install dependencies
+ run: make deps
+
+ - name: Run tests
+ run: make test
+
+ lint:
+ name: Lint
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Emacs
+ uses: jcs090218/setup-emacs@master
+ with:
+ version: '29.4'
+
+ - name: Set up Eask
+ uses: emacs-eask/setup-eask@master
+ with:
+ version: 'snapshot'
+
+ - name: Install dependencies
+ run: make deps
+
+ - name: Run linters
+ run: make lint
+
+ coverage:
+ name: Coverage
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Emacs
+ uses: jcs090218/setup-emacs@master
+ with:
+ version: '29.4'
+
+ - name: Set up Eask
+ uses: emacs-eask/setup-eask@master
+ with:
+ version: 'snapshot'
+
+ - name: Install dependencies
+ run: make deps
+
+ - name: Run coverage
+ run: make coverage
+
+ - name: Print coverage summary
+ run: python3 scripts/coverage-summary.py
+
+ - name: Upload coverage report
+ uses: actions/upload-artifact@v4
+ with:
+ name: coverage-simplecov
+ path: .coverage/simplecov.json
+ if-no-files-found: error
+ retention-days: 30