Skip to content

Commit

Permalink
ci: init
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Oct 20, 2023
1 parent 62360a2 commit 16263b6
Show file tree
Hide file tree
Showing 13 changed files with 288 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
github: mrcjkb
custom: ["https://paypal.me/simrat39", "https://www.buymeacoffee.com/simrat39"]
63 changes: 63 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Bug Report
description: Report a problem with ferris.nvim
labels: [bug]
body:

- type: markdown
attributes:
value: |
_Before reporting:_ search [existing issues](https://github.com/mrcjkb/ferris.nvim/issues?q=is%3Aopen+is%3Aissue+label%3Abug).
See also: [Troubleshooting section of README.md](https://github.com/mrcjkb/ferris.nvim/blob/master/README.md#minimal-config).
- type: input
attributes:
label: "Neovim version (nvim -v)"
placeholder: "v0.9.0"
validations:
required: true
- type: input
attributes:
label: "Operating system/version"
placeholder: "NixOS 22.05"
validations:
required: true
- type: input
attributes:
label: "Output of `:checkhealth ferris`"
validations:
required: true
- type: textarea
attributes:
label: "How to reproduce the issue"
description: |
Steps to reproduce using a [minimal config](https://github.com/mrcjkb/ferris.nvim/blob/master/troubleshooting/minimal.lua).
placeholder: |
mkdir -p /tmp/minimal
NVIM_DATA_MINIMAL=/tmp/minimal NVIM_APP_NAME="nvim-minimal" -u minimal.lua
:edit foo.rs
4j
:RustHoverActions
validations:
required: true
- type: textarea
attributes:
label: "Expected behaviour"
description: "Describe the behaviour you expect. May include logs, images, or videos."
validations:
required: true
- type: textarea
attributes:
label: "Actual behaviour"
validations:
required: true
- type: textarea
attributes:
label: "The minimal config used to reproduce this issue."
description: |
See [this example](https://github.com/mrcjkb/ferris.nvim/blob/master/tests/minimal.lua).
placeholder: |
```lua
-- paste your minimal config here
```
validations:
required: true
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Feature request
description: Request an enhancement for ferris.nvim
labels: [enhancement]
body:

- type: markdown
attributes:
value: |
Before requesting: search [existing issues](https://github.com/mrcjkb/ferris.nvim/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement).
- type: textarea
attributes:
label: "Feature description"
validations:
required: true
9 changes: 9 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- markdownlint-disable -->
###### Description of changes

###### Things done

- [ ] Tested, as applicable:
- [ ] Manually
- [ ] Added plenary specs
- [ ] Fits [CONTRIBUTING.md](https://github.com/mrcjkb/ferris.nvim/blob/master/CONTRIBUTING.md)
7 changes: 7 additions & 0 deletions .github/dependabot.yml
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"
23 changes: 23 additions & 0 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Dependabot auto-approve
on: pull_request_target

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GH_TOKEN_FOR_UPDATES }}"
- name: Approve PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
35 changes: 35 additions & 0 deletions .github/workflows/docgen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
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: mrcjkb
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/ferris.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})
29 changes: 29 additions & 0 deletions .github/workflows/flakehub-publish-tagged.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: "Publish tags to FlakeHub"
on:
push:
tags:
- "v?[0-9]+.[0-9]+.[0-9]+*"
workflow_dispatch:
inputs:
tag:
description: "The existing tag to publish to FlakeHub"
type: "string"
required: true
jobs:
flakehub-publish:
runs-on: "ubuntu-latest"
permissions:
id-token: "write"
contents: "read"
steps:
- uses: "actions/checkout@v4"
with:
ref: "${{ (inputs.tag != null) && format('refs/tags/{0}', inputs.tag) || '' }}"
- uses: "DeterminateSystems/nix-installer-action@main"
- uses: "DeterminateSystems/flakehub-push@main"
with:
visibility: "public"
name: "mrcjkb/ferris.nvim"
tag: "${{ inputs.tag }}"

27 changes: 27 additions & 0 deletions .github/workflows/nix-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Nix build"
on:
pull_request:
push:
workflow_call:
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
- uses: cachix/cachix-action@v12
with:
name: mrcjkb
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix flake check -L

shell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
- uses: cachix/cachix-action@v12
with:
name: mrcjkb
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build .#devShells.x86_64-linux.default -L
14 changes: 14 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: PR
on: pull_request

jobs:
conventional:
if: ${{ false }} # disable for now
name: Conventional PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: beemojs/conventional-pr-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Release"
on:
push:
tags:
- "*"
pull_request:

jobs:
luarocks-release:
runs-on: ubuntu-latest
name: LuaRocks upload
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fail if changelog entry does not exist
if: startsWith(github.ref, 'refs/tags/')
run: grep -q "${{ github.ref_name }}" CHANGELOG.md
- name: LuaRocks Upload
uses: nvim-neorocks/luarocks-tag-release@v5
env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
with:
detailed_description: |
This plugin automatically configures the rust-analyzer builtin LSP client
and integrates with other Rust tools. See the README's #features section
for more info.
- name: GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
bodyFile: "CHANGELOG.md"
allowUpdates: true

31 changes: 31 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: update-flake-lock
on:
workflow_dispatch: # allows manual triggering
schedule:
- cron: '0 0 * * 0' # runs weekly on Sunday at 00:00

jobs:
lockfile:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v23
with:
extra_nix_config: |
experimental-features = nix-command flakes
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@v20
with:
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
pr-title: "chore: update flake.lock" # Title of PR to be created
pr-labels: | # Labels to be set on the PR
dependencies
automated
- uses: reitermarkus/automerge@v2
with:
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
merge-method: squash
pull-request: ${{ github.event.inputs.pull-request }}
2 changes: 1 addition & 1 deletion nvim-ferris.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 16263b6

Please sign in to comment.