From fc13c5ba1f1f3d677b6d9260e273066a43eb3a92 Mon Sep 17 00:00:00 2001 From: Dmitrii Krosh Date: Tue, 12 May 2026 00:21:00 +0300 Subject: [PATCH] add github action for build app for windows and linux --- .github/workflows/ci.yml | 61 ++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 3 +- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..faf06c2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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/ diff --git a/pyproject.toml b/pyproject.toml index 3d8d32f..0d3dfc7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,8 @@ dependencies = [] dev = [ "pytest>=8.0", "black>=24.0", - "pyinstaller>=6.0" + "pyinstaller>=6.0", + "mypy>=1.0" ] [tool.setuptools.packages.find]