add github action for build app for windows and linux

This commit is contained in:
2026-05-12 00:21:00 +03:00
parent 159a45140b
commit fc13c5ba1f
2 changed files with 63 additions and 1 deletions
+61
View File
@@ -0,0 +1,61 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
format:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install black>=24.0
- run: black --check src/
typecheck:
name: Type check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install -e ".[dev]"
- run: mypy src/
test:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install -e ".[dev]"
- run: pytest
build:
name: Build (${{ matrix.os }})
needs: [format, typecheck, test]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install -e ".[dev]"
- run: pyinstaller --onefile src/nexus_sync/client/__main__.py --name nexus-sync-client
- run: pyinstaller --onefile src/nexus_sync/server/__main__.py --name nexus-sync-server
- uses: actions/upload-artifact@v4
with:
name: nexus-sync-${{ matrix.os }}
path: dist/
+2 -1
View File
@@ -15,7 +15,8 @@ dependencies = []
dev = [ dev = [
"pytest>=8.0", "pytest>=8.0",
"black>=24.0", "black>=24.0",
"pyinstaller>=6.0" "pyinstaller>=6.0",
"mypy>=1.0"
] ]
[tool.setuptools.packages.find] [tool.setuptools.packages.find]