fix: resolve CI test failures by simplifying workflow and fixing template loading
This commit is contained in:
@@ -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')"
|
||||
|
||||
Reference in New Issue
Block a user