Skip to content

Commit

Permalink
ci(github-actions): update ci actions
Browse files Browse the repository at this point in the history
  • Loading branch information
PunGrumpy committed Nov 16, 2023
1 parent 5a9e60a commit 12db903
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 38 deletions.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/failure_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## `🚨` Build Failure Report

### Summary

The build process failed due to unexpected issues.

### Job Information

- **Job Name:** Handler
- **Failed Step(s):**
- Cache ❌
- Archive ❌

### Error Details

Describe the errors encountered in detail. Include any relevant logs or error messages here.

### Possible Causes

- Changes in dependencies
- Recent code modifications
- Configuration issues

### Steps to Reproduce

If applicable, provide steps to reproduce the issue or the conditions that led to the failure.

### Proposed Solutions

Suggest potential solutions or troubleshooting steps that could resolve the problem.

### Additional Information

Any other relevant details or context about the failure.
89 changes: 51 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,20 @@
name: CI
name: 🔎 Continuous Integration
on:
push:
pull_request:

jobs:
extras:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- name: Install Neovim
shell: bash
run: |
mkdir -p /tmp/nvim
wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage -O /tmp/nvim/nvim.appimage
cd /tmp/nvim
chmod a+x ./nvim.appimage
./nvim.appimage --appimage-extract
echo "/tmp/nvim/squashfs-root/usr/bin/" >> $GITHUB_PATH
- uses: actions/checkout@v3
- name: Build Extras
run: |
nvim -u NONE -E -R --headless --cmd "set rtp^=." --cmd "packloadall" --cmd "lua require('dullahan.extra').setup()" --cmd qa
- name: Push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'chore(build): auto-generate extras'
commit_user_name: 'github-actions[bot]'
commit_user_email: 'github-actions[bot]@users.noreply.github.com'
commit_author: 'github-actions[bot] <github-actions[bot]@users.noreply.github.com>'
tests:
needs: extras
name: 🥼 Tests
if: always()
strategy:
matrix:
# os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install Neovim
- name: 🔔 Checkout
uses: actions/checkout@v4
- name: 📦 Setup Neovim
shell: bash
run: |
mkdir -p /tmp/nvim
Expand All @@ -47,47 +23,51 @@ jobs:
chmod a+x ./nvim.appimage
./nvim.appimage --appimage-extract
echo "/tmp/nvim/squashfs-root/usr/bin/" >> $GITHUB_PATH
- name: Run Tests
- name: 🧪 Test
run: |
nvim --version
[ ! -d tests ] && exit 0
nvim --headless -u tests/init.lua -c "PlenaryBustedDirectory tests/ {minimal_init = 'tests/init.lua', sequential = true}"
docs:
name: 📖 Documentation
runs-on: ubuntu-latest
needs: tests
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v3
- run: git pull
- name: panvimdoc
- name: 🔔 Checkout
uses: actions/checkout@v4
- run: 😺 Git pull
- name: 🐴 Panvimdoc
uses: kdheepak/panvimdoc@main
with:
vimdoc: dullahan.nvim
version: 'Neovim >= 0.8.0'
demojify: true
treesitter: true
- name: Push changes
- name: 😻 Push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'chore(build): auto-generate vimdoc'
commit_user_name: 'github-actions[bot]'
commit_user_email: 'github-actions[bot]@users.noreply.github.com'
commit_author: 'github-actions[bot] <github-actions[bot]@users.noreply.github.com>'
release:
name: release
name: 🚀 Release
if: ${{ github.ref == 'refs/heads/main' }}
needs:
- docs
- tests
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
- name: 🔥 Automated releases
uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: simple
package-name: dullahan.nvim
- uses: actions/checkout@v3
- name: tag stable versions
- name: 🔔 Checkout
uses: actions/checkout@v4
- name: 🏷️ Tag stable versions
if: ${{ steps.release.outputs.release_created }}
run: |
git config user.name github-actions[bot]
Expand All @@ -97,3 +77,36 @@ jobs:
git push origin :stable || true
git tag -a stable -m "Last Stable Release"
git push origin stable
handler:
name: 👋 Handler
needs:
- release
if: failure()
runs-on: ubuntu-latest
steps:
- name: 🔔 Checkout
uses: actions/checkout@v4
- name: 🌵 Cache
uses: actions/cache@v3
with:
path: |
~/.cache/nvim
~/.local/share/nvim/site/pack/packer
key: ${{ runner.os }}-dullahan.nvim-${{ hashFiles('**/init.lua') }}
restore-keys: |
${{ runner.os }}-dullahan.nvim-${{ hashFiles('**/init.lua') }}
- name: 🎁 Archive
uses: actions/upload-artifact@v2
with:
name: logs
path: |
~/.cache/nvim
~/.local/share/nvim/site/pack/packer
- name: 📮 Send issue
uses: peter-evans/create-issue-from-file@v4
with:
title: 🚨 Build failed
content-filepath: ../ISSUE_TEMPLATE/failure_report.md
labels: build
assignees: ${{ github.actor }}
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 12db903

Please sign in to comment.