generated from mrcjkb/nvim-lua-nix-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6051590
Showing
24 changed files
with
1,618 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
return { | ||
_all = { | ||
coverage = false, | ||
lpath = "lua/?.lua;lua/?/init.lua", | ||
}, | ||
default = { | ||
verbose = true | ||
}, | ||
tests = { | ||
verbose = true | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
root = true | ||
|
||
[*.*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake . -Lv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
name: Generate docs | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- master | ||
|
||
jobs: | ||
docs: | ||
name: Generate docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: cachix/install-nix-action@v23 | ||
- uses: cachix/cachix-action@v12 | ||
with: | ||
name: neorocks | ||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
|
||
- name: Generating docs | ||
run: nix run ".#docgen" | ||
|
||
- name: Update documentation | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COMMIT_MSG: | | ||
docs(generated): update doc/rocks.txt | ||
skip-checks: true | ||
run: | | ||
git config user.email "actions@github" | ||
git config user.name "Github Actions" | ||
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | ||
git add doc/ | ||
# Only commit and push if we have changes | ||
git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push origin HEAD:${GITHUB_REF}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
name: Push to LuaRocks | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
release: | ||
types: | ||
- created | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
luarocks-release: | ||
runs-on: ubuntu-latest | ||
name: Release | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Required to count the commits | ||
- name: Get Version | ||
run: echo "LUAROCKS_VERSION=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV | ||
- name: Luarocks Upload | ||
uses: nvim-neorocks/luarocks-tag-release@v5 | ||
env: | ||
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }} | ||
with: | ||
version: ${{ env.LUAROCKS_VERSION }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: "Nix build" | ||
on: | ||
pull_request: | ||
push: | ||
jobs: | ||
checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: cachix/install-nix-action@v20 | ||
- run: nix flake check -L |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
--- | ||
name: Release Please | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
release: | ||
name: release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_FOR_UPDATES }} | ||
with: | ||
release-type: simple | ||
package-name: TODO # TODO: Set package name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
name: Review Checklist | ||
|
||
on: | ||
pull_request_target: | ||
types: [opened, review_requested] | ||
|
||
jobs: | ||
review-checklist: | ||
name: Review Checklist | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const body = context.payload.pull_request.body | ||
if (body && (body.startsWith(":robot: I have created a release *beep* *boop*") || body.startsWith("Automated changes"))) { return; } | ||
const { data: comments } = await github.rest.issues.listComments({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
}); | ||
// if comment already exists, then just return | ||
if (comments.find(comment => comment.body.includes("### Review Checklist"))) { return; } | ||
// TODO: Update <owner> and <repo> | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: `### Review Checklist | ||
Does this PR follow the [Contribution Guidelines](https://github.com/<owner>/<repo>/blob/master/CONTRIBUTING.md)? Following is a _partial_ checklist: | ||
Proper [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/) scoping: | ||
- For example, fix(context): some bugfix | ||
- [ ] Pull request title has the appropriate conventional commit prefix. | ||
If applicable: | ||
- [ ] Tested | ||
- [ ] Tests have been added. | ||
- [ ] Tested manually (Steps to reproduce in PR description). | ||
- [ ] Updated documentation. | ||
- [ ] Updated [CHANGELOG.md](https://github.com/<owner>/<repo>/blob/master/CHANGELOG.md) | ||
`, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
result | ||
.pre-commit-config.yaml | ||
.direnv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
ignore = { | ||
"631", -- max_line_length | ||
"122", -- read-only field of global variable | ||
} | ||
read_globals = { | ||
"vim", | ||
"describe", | ||
"it", | ||
"assert" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
line_endings = "Unix" | ||
indent_type = "Spaces" | ||
indent_width = 2 | ||
quote_style = "AutoPreferSingle" | ||
call_parentheses = "NoSingleTable" | ||
collapse_simple_statement = "Never" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<!-- markdownlint-disable --> | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [4.0.0](https://github.com/mrcjkb/nvim-lua-nix-plugin-template/compare/v3.1.0...v4.0.0) (2024-01-05) | ||
|
||
|
||
### ⚠ BREAKING CHANGES | ||
|
||
* replace nixpkgs-fmt with alejandra | ||
|
||
### Features | ||
|
||
* add docgen workflow ([190f1f9](https://github.com/mrcjkb/nvim-lua-nix-plugin-template/commit/190f1f96b1035f5d57210f3b94cf8ebd5722f876)) | ||
* add lua-ls to pre-commit-hooks-nix ([05a35aa](https://github.com/mrcjkb/nvim-lua-nix-plugin-template/commit/05a35aa69f798386b326d902343d8d1f9421dea4)) | ||
* add luarocks package + split out type checks ([144fdf0](https://github.com/mrcjkb/nvim-lua-nix-plugin-template/commit/144fdf0c9d5244c08b593b4f46d28aee28ea1960)) | ||
* add review-checklist workflow ([6bdc4ec](https://github.com/mrcjkb/nvim-lua-nix-plugin-template/commit/6bdc4ec1e43b57489af711e4c5b71659ab9b0d9c)) | ||
* **nix:** use test suite as base for devShell ([446a48f](https://github.com/mrcjkb/nvim-lua-nix-plugin-template/commit/446a48fdfd5ea95942762ce822ae0b57d6c3ffc3)) | ||
* switch from flake-utils to flake-parts ([1b35d07](https://github.com/mrcjkb/nvim-lua-nix-plugin-template/commit/1b35d07eb215329ade4ada403c18c235b2ab7d7a)) | ||
* use neorocksTest + bump dependencies ([b604362](https://github.com/mrcjkb/nvim-lua-nix-plugin-template/commit/b604362c0d63d503b82ae35c55fb2b6c3cf9cde7)) | ||
* use release-please workflow ([c11046f](https://github.com/mrcjkb/nvim-lua-nix-plugin-template/commit/c11046f975340471a67bebb336f46d988a862647)) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* correct typo ([a6e9f13](https://github.com/mrcjkb/nvim-lua-nix-plugin-template/commit/a6e9f13a212391be752c29f19f80202738862c68)) | ||
* luarocks upload workflow ([01ba07b](https://github.com/mrcjkb/nvim-lua-nix-plugin-template/commit/01ba07b7621f6d53b75380ad898a90f5106a66ee)) | ||
* markdownlint can fail on changelog ([34ad340](https://github.com/mrcjkb/nvim-lua-nix-plugin-template/commit/34ad340b12e5cb73332561a8c32a4a0e7b514442)) | ||
* type checks for tests ([777091b](https://github.com/mrcjkb/nvim-lua-nix-plugin-template/commit/777091bd9b5031a97a41c3b257790b3c4de2209e)) | ||
|
||
|
||
### Styles | ||
|
||
* replace nixpkgs-fmt with alejandra ([eb199e0](https://github.com/mrcjkb/nvim-lua-nix-plugin-template/commit/eb199e06f3ccb2088610043a9ba154482887afe8)) | ||
|
||
## [3.1.0] - 2023-09-05 | ||
|
||
### Added | ||
|
||
- Use `neorocksTest`. | ||
|
||
### Changed | ||
|
||
- Bump `luarocks-tag-release` version. | ||
|
||
### Fixed | ||
|
||
- Fail release if changelog entry doesn't exist. | ||
|
||
## [3.0.0] - 2023-08-16 | ||
|
||
### Fixed | ||
|
||
- Luarocks Upload workflow. | ||
|
||
### Changed | ||
|
||
- Loosen license restrictions to allow any OSI approved open source derivations. | ||
- Switch from `flake-utils` to `flake-parts`. | ||
|
||
### Added | ||
|
||
- More pre-commit-hooks and linters. | ||
- `luarocks-tag-release` workflow. | ||
- Add lua-ls pre-commit checks. | ||
|
||
### Changed | ||
|
||
- Remove `cachix-action` from workflow. | ||
|
||
## [2.0.0] - 2023-01-02 | ||
|
||
### Changed | ||
|
||
- Replace `nixpkgs-fmt` with `alejandra`. | ||
|
||
## [1.0.0] - 2022-10-20 | ||
|
||
### Added | ||
|
||
- Initial release |
Oops, something went wrong.