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 example project and basic GitHub actions workflow #8

Closed
wants to merge 1 commit into from

Conversation

mrcjkb
Copy link
Contributor

@mrcjkb mrcjkb commented May 29, 2024

The CI could be set up with a matrix, but maybe that's too complex for a demo?

@mrcjkb
Copy link
Contributor Author

mrcjkb commented May 29, 2024

Copy link
Owner

@mfussenegger mfussenegger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to have an example like this, but I have the impression that this would better fit into https://github.com/nvim-lua/nvim-lua-plugin-template - and here we could just add the link to it?

I wanted to migrate the nvim-lua-plugin-template away from plenary busted anyway.

@mrcjkb
Copy link
Contributor Author

mrcjkb commented May 30, 2024

I think an example in the plugin template is definitely a good idea.

The reason I opened this PR is because it includes an "install nlua" step that uses luarocks make. That step installs the package from the checked out repo (as opposed to downloading it from luarocks). So the workflow provides some safety against breakage in case of future changes.

@mfussenegger
Copy link
Owner

I think an example in the plugin template is definitely a good idea.

The reason I opened this PR is because it includes an "install nlua" step that uses luarocks make. That step installs the package from the checked out repo (as opposed to downloading it from luarocks). So the workflow provides some safety against breakage in case of future changes.

Good point about the testing.

I've now created a variant of this in #9 that doesn't include it as a example project, but rather is just about testing nlua itself.

It also links to the plugin template and updates the setup instructions a bit.

Question for you: Can the nlua-scm-1.rockspec and the rockspec.template somehow be merged, or are both required?

@mrcjkb
Copy link
Contributor Author

mrcjkb commented May 31, 2024

Question for you: Can the nlua-scm-1.rockspec and the rockspec.template somehow be merged, or are both required?

luarocks-tag-release populates the rockspec.template with additional repo metadata (description, etc. pulled from github) and sets the source so that luarocks downloads the archive for the release tag.
The scm rockspec is slightly different.

It might be worth considering a feature in luarocks-tag-release that lets you put a placeholder for the scm rockspec source and then use that to generate the release rockspec. Something like

local modrev, specrev = 'scm', '1'
version = modrev .. '-' .. specrev
source = "PLACEHOLDER"
if modrev == 'scm' then
  source = ...
end

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