From 00f3a5981e42a987718516437f3f59fa05949c10 Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Mon, 2 Feb 2026 16:53:00 +0000 Subject: [PATCH] fix: resolve CI test failures by simplifying workflow and fixing template loading --- .gitea/workflows/ci.yml | 64 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 59 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index b9da470..ea75068 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -7,17 +7,71 @@ on: branches: [main, master] jobs: - lint: + test: runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.11", "3.12"] + steps: - uses: actions/checkout@v4 - - name: Set up Python 3.12 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -e ".[dev]" + + - name: Run tests + run: | + python -m pytest tests/ -v --tb=short + + lint: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python uses: actions/setup-python@v5 with: python-version: "3.12" - - name: Install and run ruff + - name: Install dependencies run: | - pip install --quiet ruff - ruff check gitignore_generator/ tests/ || echo "Lint check completed" + python -m pip install --upgrade pip + pip install ruff + pip install -e . + + - name: Run linter + run: | + ruff check gitignore_generator/ tests/ + + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install build dependencies + run: | + python -m pip install --upgrade pip + pip install build + + - name: Build package + run: | + python -m build + + - name: Verify installation + run: | + pip install dist/gitignore_generator-1.0.0-py3-none-any.whl + python -c "import gitignore_generator; print('Package imported successfully')"