fix(tests): comprehensive test failure resolution for v1.0.0a1 #58
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: ["**"] # All branches | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| version: "latest" | |
| enable-cache: true | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| uv sync --dev | |
| uv pip install -e . | |
| - name: Run ruff check | |
| run: uv run ruff check . --output-format=github | |
| - name: Run ruff format check | |
| run: uv run ruff format --check --diff . | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| version: "latest" | |
| enable-cache: true | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| uv sync --dev | |
| uv pip install -e . | |
| - name: Download 7zz binary for testing | |
| run: | | |
| # Download official 7zz binary (same as build workflow) | |
| VERSION="25.00" | |
| VERSION_FOR_ASSET=$(echo "$VERSION" | sed 's/\.//g') # 25.00 -> 2500 | |
| ASSET_NAME="7z${VERSION_FOR_ASSET}-linux-x64.tar.xz" | |
| DOWNLOAD_URL="https://github.com/ip7z/7zip/releases/download/${VERSION}/${ASSET_NAME}" | |
| echo "Downloading 7zz from: $DOWNLOAD_URL" | |
| TEMP_DIR=$(mktemp -d) | |
| curl -L -o "${TEMP_DIR}/${ASSET_NAME}" "$DOWNLOAD_URL" | |
| cd "${TEMP_DIR}" | |
| tar -xf "${ASSET_NAME}" | |
| # Find and install the 7zz binary | |
| BINARY_PATH=$(find . -name "7zz" -type f | head -1) | |
| if [ -n "$BINARY_PATH" ]; then | |
| sudo cp "$BINARY_PATH" /usr/local/bin/7zz | |
| sudo chmod +x /usr/local/bin/7zz | |
| echo "7zz binary installed successfully" | |
| # Set environment variable for tests | |
| echo "PY7ZZ_BINARY=/usr/local/bin/7zz" >> $GITHUB_ENV | |
| # Verify installation | |
| /usr/local/bin/7zz --help > /dev/null && echo "7zz verification passed" || exit 1 | |
| else | |
| echo "Error: 7zz binary not found in downloaded package" | |
| exit 1 | |
| fi | |
| # Clean up | |
| cd "$GITHUB_WORKSPACE" | |
| rm -rf "${TEMP_DIR}" | |
| - name: Run pytest | |
| run: uv run pytest -v --tb=short | |
| - name: Run mypy | |
| run: uv run mypy . |