add CI workflow
This commit is contained in:
75
.github/workflows/build.yml
vendored
Normal file
75
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
name: Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: macos-latest
|
||||||
|
label: macOS
|
||||||
|
build_cmd: bash scripts/build-mac.sh
|
||||||
|
artifact_path: desktop-dist/tono.dmg
|
||||||
|
artifact_name: tono-macos
|
||||||
|
|
||||||
|
- os: ubuntu-latest
|
||||||
|
label: Linux
|
||||||
|
build_cmd: bash scripts/build-linux.sh
|
||||||
|
artifact_path: desktop-dist/tono-linux.tar.gz
|
||||||
|
artifact_name: tono-linux
|
||||||
|
|
||||||
|
- os: windows-latest
|
||||||
|
label: Windows
|
||||||
|
build_cmd: npm run build:windows
|
||||||
|
artifact_path: desktop-dist/tono
|
||||||
|
artifact_name: tono-windows
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
name: Build (${{ matrix.label }})
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.12"
|
||||||
|
cache: pip
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: "20"
|
||||||
|
cache: npm
|
||||||
|
|
||||||
|
# Build scripts call `uv pip install` for Python deps
|
||||||
|
- name: Install uv
|
||||||
|
run: pip install uv
|
||||||
|
|
||||||
|
# Linux: pywebview needs webkit2gtk headers to import during PyInstaller collection
|
||||||
|
- name: Install Linux system dependencies
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -q
|
||||||
|
sudo apt-get install -y \
|
||||||
|
python3-gi python3-gi-cairo \
|
||||||
|
gir1.2-gtk-3.0 \
|
||||||
|
libwebkit2gtk-4.1-dev \
|
||||||
|
gir1.2-webkit2-4.1
|
||||||
|
|
||||||
|
- name: Install Node dependencies
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: ${{ matrix.build_cmd }}
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.artifact_name }}
|
||||||
|
path: ${{ matrix.artifact_path }}
|
||||||
|
if-no-files-found: error
|
||||||
31
.github/workflows/tests.yml
vendored
Normal file
31
.github/workflows/tests.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
name: Tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.12"
|
||||||
|
cache: pip
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: "20"
|
||||||
|
cache: npm
|
||||||
|
|
||||||
|
- name: Install Python dependencies
|
||||||
|
run: pip install -e ".[dev]"
|
||||||
|
|
||||||
|
- name: Install Node dependencies
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: python -m pytest -q
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,6 +3,7 @@
|
|||||||
*.DS_Store
|
*.DS_Store
|
||||||
.pytest_cache/
|
.pytest_cache/
|
||||||
.coverage
|
.coverage
|
||||||
|
.claude/
|
||||||
pytest-cache-files-*/
|
pytest-cache-files-*/
|
||||||
desktop-build/
|
desktop-build/
|
||||||
desktop-dist/
|
desktop-dist/
|
||||||
@@ -10,5 +11,4 @@ frontend/node_modules/
|
|||||||
frontend/dist/
|
frontend/dist/
|
||||||
.venv/
|
.venv/
|
||||||
sessions/
|
sessions/
|
||||||
.*/
|
|
||||||
frontend/coverage/
|
frontend/coverage/
|
||||||
Reference in New Issue
Block a user