Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .codacy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
exclude_paths:
- "tests/test_*.py"
20 changes: 12 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,24 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install pylint ruff pytest

- name: Run pylint
run: |
pylint pymacrorecorder main.py
pylint pymacrorecorder tests main.py

- name: Run ruff
run: |
ruff check pymacrorecorder main.py
ruff check pymacrorecorder tests main.py

# - name: Run pytest
# run: |
# pytest
- name: Run pytest with coverage
run: |
pytest --cov=pymacrorecorder --cov-report=xml --cov-report=term

- name: Upload coverage to Codacy (Coverage Variation & Diff Coverage)
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.xml

build-binaries:
name: Build binaries (${{ matrix.os }})
Expand All @@ -64,7 +69,6 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install pyinstaller

- name: Build binary (Linux via manylinux)
if: runner.os != 'Windows'
Expand All @@ -81,5 +85,5 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: PyMacroRecorder-${{ runner.os }}${{ matrix.extension }}
name: PyMacroRecorder-${{ runner.os }}
path: dist/PyMacroRecorder${{ matrix.extension }}
19 changes: 13 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install pyinstaller

- name: Build binary (Linux via manylinux)
if: runner.os != 'Windows'
Expand All @@ -48,24 +47,32 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: PyMacroRecorder-${{ runner.os }}${{ matrix.extension }}
name: PyMacroRecorder-${{ runner.os }}
path: dist/PyMacroRecorder${{ matrix.extension }}

release:
name: Publish Release
runs-on: ubuntu-latest
needs: build
timeout-minutes: 15
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: ./artifacts

- name: Create GitHub Release
- name: Upload Linux binary
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/**/PyMacroRecorder
artifacts/**/PyMacroRecorder.exe
files: artifacts/PyMacroRecorder-Linux/PyMacroRecorder
overwrite_files: true
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}

- name: Upload Windows binary
uses: softprops/action-gh-release@v2
with:
files: artifacts/PyMacroRecorder-Windows/PyMacroRecorder.exe
overwrite_files: true
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
2 changes: 1 addition & 1 deletion build-manylinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ source venv/bin/activate

echo "=== Installing deps ==="
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt pyinstaller
pip install -r requirements.txt

# Ensure PyInstaller finds libpython
export LD_LIBRARY_PATH="$(python -c 'import sysconfig; print(sysconfig.get_config_var("LIBDIR"))'):$LD_LIBRARY_PATH"
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ pyinstaller-hooks-contrib>=2026.0
pylint>=2.15.0
ruff>=0.0.241
pytest>=7.2.0
pytest-cov>=4.0.0
Loading