mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
Remove deprecated GitHub Actions workflows and issue templates
This commit is contained in:
parent
e0795fd64d
commit
d2dff4ee32
10 changed files with 0 additions and 912 deletions
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
|
@ -1,38 +0,0 @@
|
||||||
---
|
|
||||||
name: Bug report
|
|
||||||
about: Create a report to help us improve
|
|
||||||
title: ''
|
|
||||||
labels: ''
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Describe the bug**
|
|
||||||
A clear and concise description of what the bug is.
|
|
||||||
|
|
||||||
**To Reproduce**
|
|
||||||
Steps to reproduce the behavior:
|
|
||||||
1. Go to '...'
|
|
||||||
2. Click on '....'
|
|
||||||
3. Scroll down to '....'
|
|
||||||
4. See error
|
|
||||||
|
|
||||||
**Expected behavior**
|
|
||||||
A clear and concise description of what you expected to happen.
|
|
||||||
|
|
||||||
**Screenshots**
|
|
||||||
If applicable, add screenshots to help explain your problem.
|
|
||||||
|
|
||||||
**Desktop (please complete the following information):**
|
|
||||||
- OS: [e.g. iOS]
|
|
||||||
- Browser [e.g. chrome, safari]
|
|
||||||
- Version [e.g. 22]
|
|
||||||
|
|
||||||
**Smartphone (please complete the following information):**
|
|
||||||
- Device: [e.g. iPhone6]
|
|
||||||
- OS: [e.g. iOS8.1]
|
|
||||||
- Browser [e.g. stock browser, safari]
|
|
||||||
- Version [e.g. 22]
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
Add any other context about the problem here.
|
|
||||||
1
.github/ISSUE_TEMPLATE/config.yml
vendored
1
.github/ISSUE_TEMPLATE/config.yml
vendored
|
|
@ -1 +0,0 @@
|
||||||
blank_issues_enabled: false
|
|
||||||
164
.github/scripts/issue_triage.py
vendored
164
.github/scripts/issue_triage.py
vendored
|
|
@ -1,164 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
from __future__ import annotations
|
|
||||||
import os, sys, json, datetime, pathlib, textwrap, requests
|
|
||||||
from openai import OpenAI
|
|
||||||
|
|
||||||
REPO = "voideditor/void"
|
|
||||||
CACHE_FILE = pathlib.Path(".github/triage_cache.json")
|
|
||||||
STAMP_FILE = pathlib.Path(".github/last_triage.txt")
|
|
||||||
|
|
||||||
THEMES_MD = textwrap.dedent("""\
|
|
||||||
1. 🔗 LLM Integration & Provider Support
|
|
||||||
2. 🖥 App Build & Platform Compatibility
|
|
||||||
3. 🎯 Prompt, Token, and Cost Management
|
|
||||||
4. 🧩 Editor UX & Interaction Design
|
|
||||||
5. 🤖 Agent & Automation Features
|
|
||||||
6. ⚙️ System Config & Environment Setup
|
|
||||||
7. 🗃 Meta: Feature Comparison, Structure, and Naming
|
|
||||||
""").strip()
|
|
||||||
|
|
||||||
client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])
|
|
||||||
headers = {"Authorization": f"Bearer {os.environ['GITHUB_TOKEN']}"}
|
|
||||||
|
|
||||||
|
|
||||||
# ───────── helpers ────────────────────────────────────────────────────────
|
|
||||||
def utc_iso_now() -> str:
|
|
||||||
return datetime.datetime.utcnow().replace(microsecond=0, tzinfo=datetime.timezone.utc).isoformat()
|
|
||||||
|
|
||||||
def read_stamp() -> str:
|
|
||||||
return STAMP_FILE.read_text().strip() if STAMP_FILE.exists() else "1970-01-01T00:00:00Z"
|
|
||||||
|
|
||||||
def save_stamp():
|
|
||||||
STAMP_FILE.parent.mkdir(parents=True, exist_ok=True)
|
|
||||||
STAMP_FILE.write_text(utc_iso_now())
|
|
||||||
|
|
||||||
def load_cache() -> dict[int, str]:
|
|
||||||
return json.loads(CACHE_FILE.read_text()) if CACHE_FILE.exists() else {}
|
|
||||||
|
|
||||||
def save_cache(d: dict[int, str]):
|
|
||||||
CACHE_FILE.parent.mkdir(parents=True, exist_ok=True)
|
|
||||||
CACHE_FILE.write_text(json.dumps(d, indent=2))
|
|
||||||
|
|
||||||
def fetch_open_issues(since_iso: str | None = None) -> list[dict]:
|
|
||||||
issues, page = [], 1
|
|
||||||
while True:
|
|
||||||
url = (
|
|
||||||
f"https://api.github.com/repos/{REPO}/issues"
|
|
||||||
f"?state=open&per_page=100&page={page}"
|
|
||||||
+ (f"&since={since_iso}" if since_iso else "")
|
|
||||||
)
|
|
||||||
chunk = requests.get(url, headers=headers).json()
|
|
||||||
if not chunk or (isinstance(chunk, dict) and chunk.get("message")):
|
|
||||||
break
|
|
||||||
issues.extend(i for i in chunk if "pull_request" not in i)
|
|
||||||
page += 1
|
|
||||||
return issues
|
|
||||||
|
|
||||||
|
|
||||||
# ───────── main ───────────────────────────────────────────────────────────
|
|
||||||
last_stamp = read_stamp()
|
|
||||||
changed = fetch_open_issues(since_iso=last_stamp)
|
|
||||||
|
|
||||||
# Fallback if **nothing** changed AND we have *no* existing output
|
|
||||||
if not changed:
|
|
||||||
cache_exists = CACHE_FILE.exists()
|
|
||||||
wiki_exists = pathlib.Path("wiki/Issue-Categories.md").exists()
|
|
||||||
if not cache_exists or not wiki_exists:
|
|
||||||
# first run or someone wiped the wiki → build from scratch
|
|
||||||
print("⏩ First run or empty wiki — fetching ALL open issues.", file=sys.stderr)
|
|
||||||
changed = fetch_open_issues() # full list
|
|
||||||
else:
|
|
||||||
print(f"✅ No issues updated since {last_stamp}. Nothing to classify.", file=sys.stderr)
|
|
||||||
save_stamp()
|
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------- prompt
|
|
||||||
issue_lines = "\n".join(f"- {i['title']} ({i['html_url']})" for i in changed)
|
|
||||||
prompt = textwrap.dedent(f"""\
|
|
||||||
You are an AI assistant helping triage GitHub issues into exactly 7 predefined themes.
|
|
||||||
|
|
||||||
Each issue must go into exactly one of the themes below:
|
|
||||||
|
|
||||||
{THEMES_MD}
|
|
||||||
|
|
||||||
Format your output in Markdown like:
|
|
||||||
## 🎯 Prompt, Token, and Cost Management
|
|
||||||
- [#123](https://github.com/org/repo/issues/123) – Title here
|
|
||||||
|
|
||||||
Classify these issues:
|
|
||||||
{issue_lines}
|
|
||||||
""")
|
|
||||||
|
|
||||||
resp = client.chat.completions.create(
|
|
||||||
model="gpt-4.1",
|
|
||||||
messages=[{"role": "user", "content": prompt}],
|
|
||||||
temperature=0.2,
|
|
||||||
)
|
|
||||||
|
|
||||||
md = resp.choices[0].message.content
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------- parse GPT
|
|
||||||
new_map: dict[int, str] = {}
|
|
||||||
current = None
|
|
||||||
for ln in md.splitlines():
|
|
||||||
if ln.startswith("##"):
|
|
||||||
current = ln.lstrip("# ").strip()
|
|
||||||
elif ln.lstrip().startswith("- [#"):
|
|
||||||
try:
|
|
||||||
num = int(ln.split("[#")[1].split("]")[0])
|
|
||||||
new_map[num] = current
|
|
||||||
except Exception:
|
|
||||||
pass # ignore malformed lines
|
|
||||||
|
|
||||||
cache = load_cache()
|
|
||||||
cache.update(new_map)
|
|
||||||
save_cache(cache)
|
|
||||||
save_stamp()
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------- rebuild wiki
|
|
||||||
order = [
|
|
||||||
"🔗 LLM Integration & Provider Support",
|
|
||||||
"🖥 App Build & Platform Compatibility",
|
|
||||||
"🎯 Prompt, Token, and Cost Management",
|
|
||||||
"🧩 Editor UX & Interaction Design",
|
|
||||||
"🤖 Agent & Automation Features",
|
|
||||||
"⚙️ System Config & Environment Setup",
|
|
||||||
"🗃 Meta: Feature Comparison, Structure, and Naming",
|
|
||||||
]
|
|
||||||
|
|
||||||
sections: dict[str, list[int]] = {t: [] for t in order}
|
|
||||||
|
|
||||||
# ── fetch ALL current open issues once (PRs filtered out) ────────────────
|
|
||||||
title_map: dict[int, tuple[str, str]] = {}
|
|
||||||
open_now: set[int] = set()
|
|
||||||
|
|
||||||
page = 1
|
|
||||||
while True:
|
|
||||||
batch = fetch_open_issues(since_iso=None) if page == 1 else []
|
|
||||||
if not batch:
|
|
||||||
break
|
|
||||||
for it in batch:
|
|
||||||
num = it["number"]
|
|
||||||
title_map[num] = (it["title"], it["html_url"])
|
|
||||||
open_now.add(num)
|
|
||||||
page += 1
|
|
||||||
|
|
||||||
# 🧹 drop any cached IDs that are no longer open issues (e.g., became a PR or were closed)
|
|
||||||
for stale in set(cache) - open_now:
|
|
||||||
del cache[stale]
|
|
||||||
save_cache(cache) # persist cleaned cache
|
|
||||||
|
|
||||||
# build sections from cleaned cache
|
|
||||||
for num, theme in cache.items():
|
|
||||||
if theme in sections: # extra safety
|
|
||||||
sections[theme].append(num)
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------- print roadmap
|
|
||||||
for theme in order:
|
|
||||||
issues = sections[theme]
|
|
||||||
if issues:
|
|
||||||
print(f"## {theme}")
|
|
||||||
for n in sorted(issues):
|
|
||||||
title, url = title_map.get(n, ("(missing)", f"https://github.com/{REPO}/issues/{n}"))
|
|
||||||
print(f"- [#{n}]({url}) – {title}")
|
|
||||||
print()
|
|
||||||
205
.github/workflows/CONTRIBUTING.md
vendored
205
.github/workflows/CONTRIBUTING.md
vendored
|
|
@ -1,205 +0,0 @@
|
||||||
# Contributing to Void GitHub Actions Workflows
|
|
||||||
|
|
||||||
This document provides guidelines for contributing to the GitHub Actions workflows in the Void project.
|
|
||||||
|
|
||||||
## Workflow Structure
|
|
||||||
|
|
||||||
Each workflow file is located in the `.github/workflows/` directory and follows the standard GitHub Actions YAML format.
|
|
||||||
|
|
||||||
## Creating a New Workflow
|
|
||||||
|
|
||||||
To create a new workflow:
|
|
||||||
|
|
||||||
1. **Identify the purpose**: Determine what the workflow should accomplish (build, test, deploy, etc.)
|
|
||||||
2. **Choose a name**: Use descriptive names like `build.yml`, `test.yml`, `deploy.yml`
|
|
||||||
3. **Define triggers**: Specify when the workflow should run (push, pull_request, schedule, workflow_dispatch)
|
|
||||||
4. **Define jobs**: Break down the workflow into logical jobs
|
|
||||||
5. **Add documentation**: Update the `README.md` in the workflows directory
|
|
||||||
|
|
||||||
## Best Practices
|
|
||||||
|
|
||||||
### 1. Use Reusable Workflows
|
|
||||||
|
|
||||||
When possible, reuse common steps across workflows:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
cache: 'npm'
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. Use Matrix Strategy
|
|
||||||
|
|
||||||
For testing across multiple platforms or versions:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-22.04, macos-12, windows-2022]
|
|
||||||
node-version: [18, 20]
|
|
||||||
```
|
|
||||||
|
|
||||||
### 3. Cache Dependencies
|
|
||||||
|
|
||||||
Always cache dependencies to speed up builds:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- name: Cache node_modules
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: node_modules
|
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
||||||
```
|
|
||||||
|
|
||||||
### 4. Set Timeouts
|
|
||||||
|
|
||||||
Always set timeouts to prevent workflows from running indefinitely:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
timeout-minutes: 60
|
|
||||||
```
|
|
||||||
|
|
||||||
### 5. Use Environment Variables
|
|
||||||
|
|
||||||
For sensitive data, use GitHub Secrets:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
env:
|
|
||||||
API_KEY: ${{ secrets.API_KEY }}
|
|
||||||
```
|
|
||||||
|
|
||||||
### 6. Clean Up Artifacts
|
|
||||||
|
|
||||||
Remove unnecessary files to save storage:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- name: Clean up
|
|
||||||
run: |
|
|
||||||
rm -rf node_modules
|
|
||||||
rm -rf out
|
|
||||||
```
|
|
||||||
|
|
||||||
## Testing Workflows
|
|
||||||
|
|
||||||
Before committing a workflow:
|
|
||||||
|
|
||||||
1. **Test locally**: Use `act` (GitHub Actions runner) to test workflows locally
|
|
||||||
2. **Test in a branch**: Push to a feature branch and verify the workflow runs
|
|
||||||
3. **Check logs**: Review the workflow logs for any errors or warnings
|
|
||||||
4. **Verify artifacts**: If the workflow produces artifacts, verify they are correct
|
|
||||||
|
|
||||||
## Common Workflow Patterns
|
|
||||||
|
|
||||||
### Build Workflow
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
name: Build
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
- run: npm ci
|
|
||||||
- run: npm run build
|
|
||||||
```
|
|
||||||
|
|
||||||
### Test Workflow
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
name: Test
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
- run: npm ci
|
|
||||||
- run: npm test
|
|
||||||
```
|
|
||||||
|
|
||||||
### Deployment Workflow
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
name: Deploy
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
- run: npm ci
|
|
||||||
- run: npm run build
|
|
||||||
- name: Deploy to production
|
|
||||||
run: ./deploy.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
## Workflow Documentation
|
|
||||||
|
|
||||||
Each workflow should be documented in the `README.md` file in the workflows directory. Include:
|
|
||||||
|
|
||||||
- **Purpose**: What the workflow does
|
|
||||||
- **Triggers**: When it runs
|
|
||||||
- **Jobs**: What each job does
|
|
||||||
- **Artifacts**: Any artifacts produced
|
|
||||||
- **Dependencies**: Required secrets or environment variables
|
|
||||||
|
|
||||||
## Troubleshooting
|
|
||||||
|
|
||||||
### Workflow Not Triggering
|
|
||||||
|
|
||||||
1. Check the `on` section of the workflow
|
|
||||||
2. Verify the branch name matches
|
|
||||||
3. Check if the workflow is disabled in the repository settings
|
|
||||||
|
|
||||||
### Workflow Failing
|
|
||||||
|
|
||||||
1. Check the logs for error messages
|
|
||||||
2. Verify all dependencies are installed
|
|
||||||
3. Check for permission issues
|
|
||||||
4. Verify environment variables are set correctly
|
|
||||||
|
|
||||||
### Workflow Running Too Long
|
|
||||||
|
|
||||||
1. Check for infinite loops in the workflow
|
|
||||||
2. Verify all steps have timeouts
|
|
||||||
3. Check for hanging processes
|
|
||||||
|
|
||||||
## Resources
|
|
||||||
|
|
||||||
- [GitHub Actions Documentation](https://docs.github.com/en/actions)
|
|
||||||
- [GitHub Actions Marketplace](https://github.com/marketplace?type=actions)
|
|
||||||
- [act - Run GitHub Actions locally](https://github.com/nektos/act)
|
|
||||||
78
.github/workflows/README.md
vendored
78
.github/workflows/README.md
vendored
|
|
@ -1,78 +0,0 @@
|
||||||
# GitHub Actions Workflows
|
|
||||||
|
|
||||||
This directory contains the GitHub Actions workflows for building and testing Void.
|
|
||||||
|
|
||||||
## Available Workflows
|
|
||||||
|
|
||||||
### 1. `build.yml` - Main Build Workflow
|
|
||||||
Builds the main Void application and runs tests.
|
|
||||||
- **Triggers**: Push to `master` branch, pull requests, manual dispatch
|
|
||||||
- **Jobs**:
|
|
||||||
- `compile`: Compiles the project
|
|
||||||
- `test-unit`: Runs unit tests on Linux
|
|
||||||
- `test-browser`: Runs browser tests
|
|
||||||
- `lint`: Runs ESLint and Stylelint
|
|
||||||
- `hygiene`: Runs hygiene checks
|
|
||||||
|
|
||||||
### 2. `build-cli.yml` - CLI Build Workflow
|
|
||||||
Builds the Void CLI (written in Rust) on Linux.
|
|
||||||
- **Triggers**: Push to `master` branch, pull requests, manual dispatch
|
|
||||||
- **Jobs**:
|
|
||||||
- `build-cli`: Builds and tests the CLI
|
|
||||||
|
|
||||||
### 2.5. `build-cli-matrix.yml` - CLI Multi-platform Build Workflow
|
|
||||||
Builds the Void CLI (written in Rust) on multiple platforms.
|
|
||||||
- **Triggers**: Push to `master` branch, pull requests, manual dispatch
|
|
||||||
- **Jobs**:
|
|
||||||
- `build-cli`: Builds and tests the CLI on Ubuntu, macOS, and Windows
|
|
||||||
|
|
||||||
### 3. `build-extensions.yml` - Extensions Build Workflow
|
|
||||||
Builds the extensions.
|
|
||||||
- **Triggers**: Push to `master` branch, pull requests, manual dispatch
|
|
||||||
- **Jobs**:
|
|
||||||
- `build-extensions`: Compiles all extensions
|
|
||||||
|
|
||||||
### 4. `build-web.yml` - Web Build Workflow
|
|
||||||
Builds the web version of Void.
|
|
||||||
- **Triggers**: Push to `master` branch, pull requests, manual dispatch
|
|
||||||
- **Jobs**:
|
|
||||||
- `build-web`: Compiles the web version
|
|
||||||
|
|
||||||
### 5. `triage.yml` - Issue Triage Workflow
|
|
||||||
Automatically triages GitHub issues using AI.
|
|
||||||
- **Triggers**: Scheduled every 6 hours, manual dispatch
|
|
||||||
- **Jobs**:
|
|
||||||
- `roadmap`: Updates the wiki with issue categories
|
|
||||||
|
|
||||||
### 6. `publish-artifacts.yml` - Publish Build Artifacts
|
|
||||||
Publishes build artifacts for distribution.
|
|
||||||
- **Triggers**: Manual dispatch, scheduled every Monday at midnight UTC
|
|
||||||
- **Jobs**:
|
|
||||||
- `publish-artifacts`: Compiles all components and packages them for distribution
|
|
||||||
|
|
||||||
### 7. `codeql-analysis.yml` - CodeQL Analysis
|
|
||||||
Performs static code analysis using CodeQL.
|
|
||||||
- **Triggers**: Push to `master` branch, pull requests, scheduled every Monday at midnight UTC
|
|
||||||
- **Jobs**:
|
|
||||||
- `analyze`: Analyzes the codebase for security and quality issues
|
|
||||||
|
|
||||||
## Running Workflows Manually
|
|
||||||
|
|
||||||
You can manually trigger any workflow by going to the GitHub Actions tab in your repository, selecting the workflow, and clicking "Run workflow".
|
|
||||||
|
|
||||||
## Caching
|
|
||||||
|
|
||||||
The workflows use GitHub Actions caching to speed up builds:
|
|
||||||
- Node.js dependencies are cached using `npm ci`
|
|
||||||
- Rust dependencies are cached for the CLI build
|
|
||||||
- Build artifacts are cached when possible
|
|
||||||
|
|
||||||
## Environment
|
|
||||||
|
|
||||||
All workflows run on Ubuntu 22.04 by default, with appropriate build tools installed.
|
|
||||||
|
|
||||||
## Dependencies
|
|
||||||
|
|
||||||
- Node.js version is specified in `.nvmrc`
|
|
||||||
- Rust toolchain is set to stable
|
|
||||||
- Build tools: `build-essential`, `pkg-config`, `libx11-dev`, `libx11-xcb-dev`, `libxkbfile-dev`, `libnotify-bin`, `libkrb5-dev`
|
|
||||||
228
.github/workflows/USAGE.md
vendored
228
.github/workflows/USAGE.md
vendored
|
|
@ -1,228 +0,0 @@
|
||||||
# Utilisation des Workflows GitHub Actions
|
|
||||||
|
|
||||||
Ce document explique comment utiliser les workflows GitHub Actions pour builder et tester le projet Void.
|
|
||||||
|
|
||||||
## Table des Matières
|
|
||||||
|
|
||||||
1. [Exécution des Workflows](#exécution-des-workflows)
|
|
||||||
2. [Workflow Principal (build.yml)](#workflow-principal-buildyml)
|
|
||||||
3. [Build de la CLI](#build-de-la-cli)
|
|
||||||
4. [Build des Extensions](#build-des-extensions)
|
|
||||||
5. [Build Web](#build-web)
|
|
||||||
6. [Publication des Artifacts](#publication-des-artifacts)
|
|
||||||
7. [Analyse CodeQL](#analyse-codeql)
|
|
||||||
8. [Triage des Issues](#triage-des-issues)
|
|
||||||
9. [Exécution Locale](#exécution-locale)
|
|
||||||
10. [Dépannage](#dépannage)
|
|
||||||
|
|
||||||
## Exécution des Workflows
|
|
||||||
|
|
||||||
### Déclenchement Automatique
|
|
||||||
|
|
||||||
Tous les workflows sont configurés pour s'exécuter automatiquement dans les cas suivants :
|
|
||||||
|
|
||||||
- **Push** sur la branche `master`
|
|
||||||
- **Pull Request** vers la branche `master`
|
|
||||||
- **Planifié** (pour certains workflows comme `triage.yml` et `codeql-analysis.yml`)
|
|
||||||
|
|
||||||
### Déclenchement Manuel
|
|
||||||
|
|
||||||
Vous pouvez déclencher manuellement n'importe quel workflow :
|
|
||||||
|
|
||||||
1. Allez dans l'onglet **Actions** de votre dépôt GitHub
|
|
||||||
2. Sélectionnez le workflow que vous souhaitez exécuter
|
|
||||||
3. Cliquez sur le bouton **Run workflow**
|
|
||||||
4. Cliquez sur **Run workflow** à nouveau pour confirmer
|
|
||||||
|
|
||||||
## Workflow Principal (build.yml)
|
|
||||||
|
|
||||||
Ce workflow est le cœur du processus de build et de test.
|
|
||||||
|
|
||||||
### Jobs disponibles :
|
|
||||||
|
|
||||||
- **compile** : Compile le projet
|
|
||||||
- **test-unit** : Exécute les tests unitaires sur Linux
|
|
||||||
- **test-browser** : Exécute les tests navigateur
|
|
||||||
- **lint** : Exécute ESLint et Stylelint
|
|
||||||
- **hygiene** : Exécute les vérifications d'hygiène
|
|
||||||
|
|
||||||
### Comment utiliser :
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Pour voir les résultats des builds
|
|
||||||
cd /Users/jcommaret/Sites/void
|
|
||||||
npm run compile
|
|
||||||
|
|
||||||
# Pour exécuter les tests unitaires
|
|
||||||
npm run test-node
|
|
||||||
|
|
||||||
# Pour exécuter les tests navigateur
|
|
||||||
npm run playwright-install
|
|
||||||
npm run test-browser
|
|
||||||
|
|
||||||
# Pour exécuter le linting
|
|
||||||
npm run eslint
|
|
||||||
npm run stylelint
|
|
||||||
|
|
||||||
# Pour exécuter les vérifications d'hygiène
|
|
||||||
npm run hygiene
|
|
||||||
```
|
|
||||||
|
|
||||||
## Build de la CLI
|
|
||||||
|
|
||||||
La CLI est écrite en Rust et peut être buildée sur différentes plateformes.
|
|
||||||
|
|
||||||
### Build sur Linux/macOS/Windows :
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd cli
|
|
||||||
cargo build --release
|
|
||||||
```
|
|
||||||
|
|
||||||
### Exécution des tests :
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd cli
|
|
||||||
cargo test
|
|
||||||
```
|
|
||||||
|
|
||||||
### Build multi-plateforme :
|
|
||||||
|
|
||||||
Le workflow `build-cli-matrix.yml` build la CLI sur :
|
|
||||||
- Ubuntu 22.04
|
|
||||||
- macOS 12
|
|
||||||
- Windows 2022
|
|
||||||
|
|
||||||
## Build des Extensions
|
|
||||||
|
|
||||||
Les extensions sont buildées séparément pour permettre une mise à jour indépendante.
|
|
||||||
|
|
||||||
### Comment build les extensions :
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm run compile-extensions-build
|
|
||||||
```
|
|
||||||
|
|
||||||
## Build Web
|
|
||||||
|
|
||||||
La version web de Void peut être buildée séparément.
|
|
||||||
|
|
||||||
### Comment build la version web :
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm run compile-web
|
|
||||||
```
|
|
||||||
|
|
||||||
## Publication des Artifacts
|
|
||||||
|
|
||||||
Le workflow `publish-artifacts.yml` compile tous les composants et les package pour distribution.
|
|
||||||
|
|
||||||
### Comment exécuter manuellement :
|
|
||||||
|
|
||||||
1. Allez dans l'onglet **Actions**
|
|
||||||
2. Sélectionnez **Publish Build Artifacts**
|
|
||||||
3. Cliquez sur **Run workflow**
|
|
||||||
|
|
||||||
### Artifacts produits :
|
|
||||||
|
|
||||||
- `out/` : Build principal
|
|
||||||
- `void-cli-linux` : Binaire CLI pour Linux
|
|
||||||
- `out-vscode/` : Build web
|
|
||||||
|
|
||||||
## Analyse CodeQL
|
|
||||||
|
|
||||||
Le workflow `codeql-analysis.yml` effectue une analyse statique du code pour détecter les problèmes de sécurité et de qualité.
|
|
||||||
|
|
||||||
### Comment voir les résultats :
|
|
||||||
|
|
||||||
1. Allez dans l'onglet **Security** de votre dépôt
|
|
||||||
2. Sélectionnez **Code scanning**
|
|
||||||
3. Vous verrez les alertes détectées par CodeQL
|
|
||||||
|
|
||||||
## Triage des Issues
|
|
||||||
|
|
||||||
Le workflow `triage.yml` utilise l'IA pour trier automatiquement les issues GitHub.
|
|
||||||
|
|
||||||
### Comment configurer :
|
|
||||||
|
|
||||||
Vous devez configurer les secrets suivants dans votre dépôt :
|
|
||||||
- `OPENAI_API_KEY` : Clé API OpenAI
|
|
||||||
- `WIKI_TOKEN` : Token GitHub avec accès wiki
|
|
||||||
|
|
||||||
### Comment exécuter manuellement :
|
|
||||||
|
|
||||||
1. Allez dans l'onglet **Actions**
|
|
||||||
2. Sélectionnez **Issue Triage to Wiki**
|
|
||||||
3. Cliquez sur **Run workflow**
|
|
||||||
|
|
||||||
## Exécution Locale
|
|
||||||
|
|
||||||
Vous pouvez tester les workflows localement en utilisant `act` (GitHub Actions runner).
|
|
||||||
|
|
||||||
### Installation :
|
|
||||||
|
|
||||||
```bash
|
|
||||||
brew install act
|
|
||||||
```
|
|
||||||
|
|
||||||
### Exécution d'un workflow :
|
|
||||||
|
|
||||||
```bash
|
|
||||||
act -j build
|
|
||||||
```
|
|
||||||
|
|
||||||
### Exécution de tous les workflows :
|
|
||||||
|
|
||||||
```bash
|
|
||||||
act
|
|
||||||
```
|
|
||||||
|
|
||||||
## Dépannage
|
|
||||||
|
|
||||||
### Problème : Le workflow ne se déclenche pas
|
|
||||||
|
|
||||||
**Solutions** :
|
|
||||||
1. Vérifiez que le workflow est bien dans `.github/workflows/`
|
|
||||||
2. Vérifiez la section `on` du workflow YAML
|
|
||||||
3. Vérifiez que le workflow n'est pas désactivé dans les paramètres du dépôt
|
|
||||||
4. Vérifiez que vous avez les permissions nécessaires
|
|
||||||
|
|
||||||
### Problème : Le workflow échoue
|
|
||||||
|
|
||||||
**Solutions** :
|
|
||||||
1. Vérifiez les logs du workflow pour voir où il échoue
|
|
||||||
2. Vérifiez que toutes les dépendances sont installées
|
|
||||||
3. Vérifiez que les variables d'environnement sont correctement configurées
|
|
||||||
4. Vérifiez que vous avez assez d'espace disque
|
|
||||||
5. Vérifiez que vous avez assez de mémoire
|
|
||||||
|
|
||||||
### Problème : Le workflow prend trop de temps
|
|
||||||
|
|
||||||
**Solutions** :
|
|
||||||
1. Vérifiez que tous les jobs ont des timeouts configurés
|
|
||||||
2. Vérifiez qu'il n'y a pas de boucles infinies dans le code
|
|
||||||
3. Vérifiez que les dépendances sont bien cachées
|
|
||||||
4. Vérifiez que vous n'avez pas de processus qui s'exécutent indéfiniment
|
|
||||||
|
|
||||||
### Problème : Les artifacts ne sont pas disponibles
|
|
||||||
|
|
||||||
**Solutions** :
|
|
||||||
1. Vérifiez que le job qui produit les artifacts a réussi
|
|
||||||
2. Vérifiez que les artifacts sont bien configurés dans le workflow
|
|
||||||
3. Vérifiez que vous avez les permissions pour télécharger les artifacts
|
|
||||||
4. Vérifiez que les artifacts n'ont pas expiré (durée de conservation par défaut : 30 jours)
|
|
||||||
|
|
||||||
## Bonnes Pratiques
|
|
||||||
|
|
||||||
1. **Commitez souvent** : Plus vous commitez souvent, plus les workflows s'exécutent souvent, ce qui permet de détecter les problèmes plus tôt
|
|
||||||
2. **Utilisez des branches de feature** : Créez des branches de feature pour développer de nouvelles fonctionnalités et utilisez des pull requests pour les fusionner
|
|
||||||
3. **Vérifiez les workflows avant de fusionner** : Assurez-vous que tous les workflows passent avant de fusionner une pull request
|
|
||||||
4. **Nettoyez les artifacts** : Supprimez les artifacts inutiles pour économiser de l'espace de stockage
|
|
||||||
5. **Documentez les changements** : Documentez les changements apportés aux workflows dans les pull requests
|
|
||||||
|
|
||||||
## Ressources
|
|
||||||
|
|
||||||
- [Documentation GitHub Actions](https://docs.github.com/en/actions)
|
|
||||||
- [Marketplace GitHub Actions](https://github.com/marketplace?type=actions)
|
|
||||||
- [act - Run GitHub Actions locally](https://github.com/nektos/act)
|
|
||||||
- [CodeQL Documentation](https://codeql.github.com/docs/)
|
|
||||||
59
.github/workflows/build-cli-matrix.yml
vendored
59
.github/workflows/build-cli-matrix.yml
vendored
|
|
@ -1,59 +0,0 @@
|
||||||
name: Build CLI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "master" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "master" ]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-cli:
|
|
||||||
name: Build CLI (macOS)
|
|
||||||
runs-on: macos-12
|
|
||||||
timeout-minutes: 60
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: cli
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Check clean git state
|
|
||||||
run: .github/workflows/check-clean-git-state.sh
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: '3.11'
|
|
||||||
|
|
||||||
- name: Set up Rust
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
profile: minimal
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Cache Cargo dependencies
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
cli/target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
|
|
||||||
- name: Build CLI
|
|
||||||
run: |
|
|
||||||
cargo build --release
|
|
||||||
|
|
||||||
- name: Run CLI tests
|
|
||||||
run: |
|
|
||||||
cargo test
|
|
||||||
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: code-cli-macos
|
|
||||||
path: cli/target/release/code
|
|
||||||
|
|
||||||
49
.github/workflows/build-darwin-arm64.yml
vendored
49
.github/workflows/build-darwin-arm64.yml
vendored
|
|
@ -1,49 +0,0 @@
|
||||||
name: Build Void for macOS (ARM64)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "master" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "master" ]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: macos-latest
|
|
||||||
timeout-minutes: 60
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '22'
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm install
|
|
||||||
|
|
||||||
- name: Install stable TypeScript version
|
|
||||||
run: npm install typescript@5.4.5 --save-dev
|
|
||||||
|
|
||||||
- name: Start gulp watch in background
|
|
||||||
run: npm run gulp watch &
|
|
||||||
env:
|
|
||||||
NODE_ENV: development
|
|
||||||
|
|
||||||
- name: Wait for monaco.d.ts to be generated
|
|
||||||
run: sleep 180
|
|
||||||
|
|
||||||
- name: Build React
|
|
||||||
run: npm run buildreact
|
|
||||||
|
|
||||||
- name: Build for macOS ARM64
|
|
||||||
run: npm run gulp vscode-darwin-arm64
|
|
||||||
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: void-darwin-arm64
|
|
||||||
path: out-vscode/
|
|
||||||
retention-days: 7
|
|
||||||
16
.github/workflows/check-clean-git-state.sh
vendored
16
.github/workflows/check-clean-git-state.sh
vendored
|
|
@ -1,16 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Check if git status is clean (no uncommitted changes)
|
|
||||||
if ! git diff --quiet --ignore-submodules HEAD; then
|
|
||||||
echo "Error: Uncommitted changes detected in the repository"
|
|
||||||
git status
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! git diff --quiet --cached --ignore-submodules HEAD; then
|
|
||||||
echo "Error: Uncommitted staged changes detected in the repository"
|
|
||||||
git status
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Git status is clean"
|
|
||||||
74
.github/workflows/publish-artifacts.yml
vendored
74
.github/workflows/publish-artifacts.yml
vendored
|
|
@ -1,74 +0,0 @@
|
||||||
name: Publish Build Artifacts
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 0 * * 1' # Every Monday at midnight UTC
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish-artifacts:
|
|
||||||
name: Publish Build Artifacts
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
timeout-minutes: 120
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
npm ci
|
|
||||||
env:
|
|
||||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
|
||||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
|
||||||
|
|
||||||
- name: Install build tools
|
|
||||||
run: |
|
|
||||||
sudo apt update -y
|
|
||||||
sudo apt install -y build-essential pkg-config libx11-dev libx11-xcb-dev libxkbfile-dev libnotify-bin libkrb5-dev
|
|
||||||
|
|
||||||
- name: Compile
|
|
||||||
run: |
|
|
||||||
npm run compile
|
|
||||||
|
|
||||||
- name: Build extensions
|
|
||||||
run: |
|
|
||||||
npm run compile-extensions-build
|
|
||||||
|
|
||||||
- name: Build web version
|
|
||||||
run: |
|
|
||||||
npm run compile-web
|
|
||||||
|
|
||||||
- name: Build CLI
|
|
||||||
working-directory: cli
|
|
||||||
run: |
|
|
||||||
cargo build --release
|
|
||||||
|
|
||||||
- name: Package artifacts
|
|
||||||
run: |
|
|
||||||
# Create a directory for artifacts
|
|
||||||
mkdir -p artifacts
|
|
||||||
|
|
||||||
# Copy main build artifacts
|
|
||||||
cp -r out/ artifacts/out/
|
|
||||||
|
|
||||||
# Copy CLI binary
|
|
||||||
cp cli/target/release/void artifacts/void-cli-linux
|
|
||||||
|
|
||||||
# Copy web build
|
|
||||||
cp -r out-vscode/ artifacts/out-vscode/
|
|
||||||
|
|
||||||
# Create a zip file
|
|
||||||
zip -r void-artifacts.zip artifacts/
|
|
||||||
|
|
||||||
- name: Upload artifacts
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: void-build-artifacts
|
|
||||||
path: void-artifacts.zip
|
|
||||||
retention-days: 30
|
|
||||||
Loading…
Reference in a new issue