Skip to content

Commit 7468f54

Browse files
committed
Add integration tests for MergeOrchestrator and scanning module
- Implemented comprehensive integration tests for the MergeOrchestrator, covering end-to-end workflows for scanning and merging folders, including conflict resolution and logging. - Created tests for the scanning module to validate folder scanning, file hashing, error recovery, symlink handling, and edge cases with special characters in folder names. - Ensured realistic data structures are tested to match expected specifications.
1 parent 7a138d7 commit 7468f54

47 files changed

Lines changed: 12877 additions & 64 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto eol=lf
3+
4+
# Python files
5+
*.py text diff=python
6+
*.pyi text diff=python
7+
*.pyw text diff=python
8+
*.ipynb text
9+
10+
# Docker files
11+
Dockerfile text
12+
*.dockerfile text
13+
docker-compose*.yml text
14+
.dockerignore text
15+
16+
# Documentation
17+
*.md text diff=markdown
18+
*.txt text
19+
*.rst text
20+
LICENSE text
21+
22+
# Config files
23+
*.json text
24+
*.toml text
25+
*.yml text
26+
*.yaml text
27+
*.ini text
28+
*.cfg text
29+
*.conf text
30+
31+
# Web files
32+
*.html text diff=html
33+
*.html.j2 text diff=html
34+
*.css text diff=css
35+
*.js text
36+
*.jsx text
37+
*.ts text
38+
*.tsx text
39+
*.vue text
40+
41+
# SQL files
42+
*.sql text
43+
44+
# Binary files
45+
*.db binary
46+
*.p binary
47+
*.pkl binary
48+
*.pickle binary
49+
*.pyc binary
50+
*.pyd binary
51+
*.pyo binary
52+
*.pdb binary
53+
54+
# Image files
55+
*.png binary
56+
*.jpg binary
57+
*.jpeg binary
58+
*.gif binary
59+
*.ico binary
60+
*.svg text
61+
62+
# Font files
63+
*.ttf binary
64+
*.eot binary
65+
*.woff binary
66+
*.woff2 binary
67+
68+
# Archive files
69+
*.zip binary
70+
*.7z binary
71+
*.gz binary
72+
*.tar binary
73+
*.tgz binary
74+
*.rar binary
75+
76+
# Executables
77+
*.exe binary
78+
*.dll binary
79+
*.so binary
80+
*.dylib binary
81+
82+
.env text=utf-8 eol=lf
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Multi-platform executable build and smoke test workflow
2+
# This workflow builds the PyInstaller executable on Linux, macOS, and Windows,
3+
# then runs smoke tests to verify the executable works correctly.
4+
5+
name: Build Executable
6+
7+
on:
8+
push:
9+
branches: [main]
10+
paths:
11+
- 'mergy/**'
12+
- 'mergy.py'
13+
- 'mergy.spec'
14+
- 'requirements.txt'
15+
- 'pyproject.toml'
16+
- '.github/workflows/build-executable.yml'
17+
pull_request:
18+
branches: [main]
19+
paths:
20+
- 'mergy/**'
21+
- 'mergy.py'
22+
- 'mergy.spec'
23+
- 'requirements.txt'
24+
- 'pyproject.toml'
25+
- '.github/workflows/build-executable.yml'
26+
workflow_dispatch:
27+
28+
jobs:
29+
build:
30+
name: Build on ${{ matrix.os }}
31+
runs-on: ${{ matrix.os }}
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
os: [ubuntu-latest, macos-latest, windows-latest]
36+
include:
37+
- os: ubuntu-latest
38+
executable: dist/mergy
39+
artifact_name: mergy-linux
40+
- os: macos-latest
41+
executable: dist/mergy
42+
artifact_name: mergy-macos
43+
- os: windows-latest
44+
executable: dist/mergy.exe
45+
artifact_name: mergy-windows
46+
47+
steps:
48+
- name: Checkout code
49+
uses: actions/checkout@v4
50+
51+
- name: Set up Python
52+
uses: actions/setup-python@v5
53+
with:
54+
python-version: '3.11'
55+
56+
- name: Install dependencies
57+
run: |
58+
python -m pip install --upgrade pip
59+
pip install -r requirements.txt
60+
pip install pyinstaller
61+
62+
- name: Build executable
63+
run: pyinstaller mergy.spec
64+
65+
- name: Verify executable exists
66+
shell: bash
67+
run: |
68+
if [ -f "${{ matrix.executable }}" ]; then
69+
echo "Executable built successfully"
70+
ls -lh ${{ matrix.executable }}
71+
else
72+
echo "ERROR: Executable not found at ${{ matrix.executable }}"
73+
exit 1
74+
fi
75+
76+
- name: Smoke test - version
77+
shell: bash
78+
run: |
79+
${{ matrix.executable }} --version
80+
81+
- name: Smoke test - scan test data
82+
shell: bash
83+
run: |
84+
${{ matrix.executable }} scan examples/test_data/computerNames
85+
86+
- name: Smoke test - dry-run merge
87+
shell: bash
88+
run: |
89+
${{ matrix.executable }} merge examples/test_data/computerNames --dry-run
90+
91+
- name: Upload artifact
92+
uses: actions/upload-artifact@v4
93+
with:
94+
name: ${{ matrix.artifact_name }}
95+
path: ${{ matrix.executable }}
96+
retention-days: 7

.gitignore

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Python bytecode and cache
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# Distribution and packaging
7+
*.egg-info/
8+
.eggs/
9+
dist/
10+
build/
11+
*.egg
12+
wheels/
13+
*.whl
14+
.installed.cfg
15+
16+
# Virtual environments
17+
venv/
18+
env/
19+
.venv/
20+
.env/
21+
ENV/
22+
env.bak/
23+
venv.bak/
24+
pyvenv.cfg
25+
26+
# Testing and coverage
27+
.pytest_cache/
28+
.coverage
29+
htmlcov/
30+
.tox/
31+
*.cover
32+
.hypothesis/
33+
34+
# IDE and editor files
35+
.vscode/
36+
.idea/
37+
*.swp
38+
*.swo
39+
*.swn
40+
*~
41+
.project
42+
.pydevproject
43+
.spyderproject
44+
.spyproject
45+
46+
# Operating system files
47+
.DS_Store
48+
Thumbs.db
49+
Desktop.ini
50+
*.lnk
51+
52+
# Application-specific files (Mergy)
53+
merge_log_*.log
54+
*.log
55+
.merged/
56+
57+
# Temporary and backup files
58+
*.tmp
59+
*.temp
60+
*.bak
61+
*.backup
62+
*.orig
63+
64+
# Documentation build artifacts
65+
docs/_build/
66+
site/

0 commit comments

Comments
 (0)