Skip to content

Github workflow - #15

Open
vkazanov wants to merge 1 commit into
Reagankm:masterfrom
vkazanov:github-action
Open

vkazanov wants to merge 1 commit into
Reagankm:masterfrom
vkazanov:github-action

Conversation

@vkazanov

@vkazanov vkazanov commented Jul 7, 2025

Copy link
Copy Markdown

As discussed elsewhere, it is nice to have a CI pipeline set up for the project.

This PR implements a Github Workflow that compiles the package and runs all tests in Emacs 27/28/29/30, Windows/MacOS/Linux. Note that running tests on Emacs 27 / MacOS is excluded as this Emacs version is not available.

To be honest, it's great that all three major platforms are tested automatically, even if one of them doesn't check the oldest Emacs version renpy-mode supports.

@morganwillcock what do you think?

@vkazanov

vkazanov commented Jul 8, 2025

Copy link
Copy Markdown
Author

Okay, as mentioned elsewhere, we should set this up within this repo unless @Reagankm agrees to it. The point is that this might result in too many extra emails.

Let's keep the PR for now.

@morganwillcock

morganwillcock commented Jul 8, 2025

Copy link
Copy Markdown
Collaborator

I think unless Reagan replies again at some point, we will have to create a fork and update the Melpa recipe in order to add the CI. But that said, I've tried it out on my fork:
https://github.com/morganwillcock/renpy-mode/commits/ci/

I am using this workflow, based on workflows that I have used before:

name: Test

on:
  - push
  - pull_request
  - workflow_dispatch

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        emacs-version:
          - 27.2
          - 28.2
          - 29.4
          - 30.1
          - snapshot
        os:
          - macos-latest
          - ubuntu-latest
          - windows-latest
        exclude:
          - os: macos-latest
            emacs-version: 27.2
    runs-on: ${{ matrix.os }}
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
      - name: Setup Emacs
        uses: jcs090218/setup-emacs@master
        with:
          version: ${{ matrix.emacs-version }}
      - name: Setup Eask
        uses: emacs-eask/setup-eask@master
        with:
          version: snapshot
      - name: Run ERT tests
        run: eask test ert-runner
      - name: Lint with checkdoc
        if: always()
        run: eask lint checkdoc
      - name: Lint with package-lint
        if: always()
        run: eask lint package

From testing:

  • It probably isn't a good idea to use continue-on-error because it marks a failed step as not failing, and so no-one will ever look to see what the error is. It is probably best to just let the step fail and then choose to ignore the failure if that is the correct thing to do.
  • Eask doesn't correctly set an exit code when eask lint checkdoc finds an issue, so the step will never fail.
  • The package-lint documentation suggestions that it will also do a checkdoc check, but I can't see any envidence that it actually does that.

At the moment Emacs cannot be installed on Windows because the download servers are not available, so workflow is failing at the moment, but otherwise it seems to be working as expected. Edit: the servers are back up now so I've re-run the failed jobs.

@vkazanov

vkazanov commented Jul 9, 2025

Copy link
Copy Markdown
Author

So this leaves us with 1) ert tests + 2) package-lint. I guess I'll take that, even though checkdoc would be nice to run as well.

I'd suggest keeping the PR open for now as a reminder, and then come back to this topic once we get setup Melpa/repo properly. There are a couple of more things I want to do before focusing on the intial release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants