feat: Implement Tour Schedule Engine with queue management and announcement features
- Added TourScheduleEngine class for managing user queues in a guild. - Implemented methods for joining, leaving, listing, and clearing queues. - Added functionality to promote users to speaker in a stage channel and send announcements. - Created integration tests for the TourScheduleEngine to verify FIFO behavior and announcement dispatch. test: Add unit tests for ping and sign-up commands - Created tests for ping command to ensure it replies with "Pong!". - Implemented tests for sign-up command to verify queue joining, listing, and permission checks. test: Add integration tests for mileage engine flow - Developed tests to validate mileage awarding, event persistence, and role upgrades based on mileage thresholds. chore: Update TypeScript configuration for ESLint - Added tsconfig.eslint.json for ESLint integration. - Modified tsconfig.json to exclude test files from the main compilation.
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
name: CI-CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "**"
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
bot-checks:
|
||||
name: Bot Lint Test Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "22"
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Test
|
||||
run: npm run test
|
||||
|
||||
dashboard-checks:
|
||||
name: Dashboard Lint Build
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: admin-dashboard
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "22"
|
||||
cache: npm
|
||||
cache-dependency-path: admin-dashboard/package-lock.json
|
||||
|
||||
- name: Install dashboard dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Lint dashboard
|
||||
run: npm run lint
|
||||
|
||||
- name: Build dashboard
|
||||
run: npm run build
|
||||
|
||||
deploy-coolify:
|
||||
name: Deploy to Coolify
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- bot-checks
|
||||
- dashboard-checks
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Trigger Coolify deploy hook
|
||||
env:
|
||||
COOLIFY_DEPLOY_HOOK_URL: ${{ secrets.COOLIFY_DEPLOY_HOOK_URL }}
|
||||
COOLIFY_DEPLOY_TOKEN: ${{ secrets.COOLIFY_DEPLOY_TOKEN }}
|
||||
run: |
|
||||
if [ -z "$COOLIFY_DEPLOY_HOOK_URL" ]; then
|
||||
echo "Missing COOLIFY_DEPLOY_HOOK_URL secret"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -n "$COOLIFY_DEPLOY_TOKEN" ]; then
|
||||
curl --fail --show-error --silent \
|
||||
-X POST \
|
||||
-H "Authorization: Bearer $COOLIFY_DEPLOY_TOKEN" \
|
||||
"$COOLIFY_DEPLOY_HOOK_URL"
|
||||
else
|
||||
curl --fail --show-error --silent -X POST "$COOLIFY_DEPLOY_HOOK_URL"
|
||||
fi
|
||||
|
||||
echo "Coolify deploy triggered"
|
||||
Reference in New Issue
Block a user