Skip to content

Commit

Permalink
Attempt to add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Neko-Box-Coder committed Dec 1, 2024
1 parent a2231e3 commit 892eb90
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github-scheduled-workflows/install-plugins.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "Delayed Plugin Installation"
on:
schedule:
- cron: '*/30 * * * *' # Run every 30 minutes

jobs:
install-plugins:
runs-on: ubuntu-latest
strategy:
matrix:
channel: ['main', 'stable']

steps:
- name: Install Micro editor from nightly
run: |
wget https://github.com/zyedidia/micro/releases/download/nightly/micro-nightly-linux64.tar.gz
tar xzf micro-nightly-linux64.tar.gz
- name: Configure Micro plugin channel
run: |
mkdir -p ~/.config/micro
echo '{
"pluginchannels": [
"https://raw.githubusercontent.com/Neko-Box-Coder/unofficial-plugin-channel/${{ matrix.channel }}/channel.json"
]
}' > ~/.config/micro/settings.json
- name: Install plugins
run: |
./micro-*/micro -plugin install acme
./micro-*/micro -plugin install xonsh
./micro-*/micro -plugin list
- name: Check plugin installation
run: |
if ! ./micro-*/micro -plugin list | grep -q "acme"; then
echo "Acme plugin installation failed for ${{ matrix.channel }} channel"
exit 1
fi
if ! ./micro-*/micro -plugin list | grep -q "xonsh"; then
echo "Xonsh plugin installation failed for ${{ matrix.channel }} channel"
exit 1
fi
- name: Remove scheduled job
if: always() # Run this step regardless of previous steps' success/failure
uses: cardinalby/unschedule-job-action@v1
with:
ghToken: ${{ secrets.WORKFLOWS_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/trigger-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Trigger Test Install Micro Plugins

on:
push:
branches:
- main
workflow_dispatch: # Allow manual trigger

jobs:
schedule-install:
runs-on: ubuntu-latest
steps:
- name: Schedule delayed job
uses: cardinalby/schedule-job-action@v1
with:
ghToken: ${{ secrets.WORKFLOWS_TOKEN }}
templateYmlFile: '.github-scheduled-workflows/install-plugins.yml'

0 comments on commit 892eb90

Please sign in to comment.