Files
NexaLogi/.gitlab-ci.yml
nessi 454cad95c5 Add project infrastructure and core application files
Add .gitignore, GitLab CI pipeline with test/lint/build/release stages, project documentation (README, LICENSE, CHANGELOG, CONTRIBUTING, SECURITY), PyInstaller packaging configuration with icon and version info, Python project configuration with dependencies, and complete application source including battery provider, device discovery, settings management, UI components, startup control, and comprehensive test suite
2026-06-21 11:07:05 +02:00

49 lines
1.1 KiB
YAML

stages:
- test
- lint
- build
- release
default:
tags:
- windows
before_script:
- py -3.12 -m pip install --disable-pip-version-check -r requirements.txt
test:
stage: test
script:
- py -3.12 -m pytest
lint:
stage: lint
script:
- py -3.12 -m ruff check .
build:
stage: build
needs: ["test", "lint"]
script:
- py -3.12 -m PyInstaller --clean --noconfirm packaging/pyinstaller.spec
- powershell -NoProfile -Command "$hash=(Get-FileHash dist/LogitechBatteryWidget.exe -Algorithm SHA256).Hash.ToLower(); \"$hash LogitechBatteryWidget.exe\" | Set-Content -Encoding ascii dist/LogitechBatteryWidget.exe.sha256"
artifacts:
name: "LogitechBatteryWidget-$CI_COMMIT_SHORT_SHA"
paths:
- dist/LogitechBatteryWidget.exe
- dist/LogitechBatteryWidget.exe.sha256
expire_in: 30 days
release:
stage: release
needs:
- job: build
artifacts: true
script:
- powershell -NoProfile -Command "Get-Content dist/LogitechBatteryWidget.exe.sha256"
artifacts:
paths:
- dist/LogitechBatteryWidget.exe
- dist/LogitechBatteryWidget.exe.sha256
rules:
- if: '$CI_COMMIT_TAG'