Update CI workflow - simpler configuration
This commit is contained in:
@@ -18,24 +18,17 @@ jobs:
|
|||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: '3.10'
|
||||||
|
|
||||||
- name: Cache pip packages
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pip-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
|
pip install pytest pytest-cov
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
pytest tests/ -v --cov=man_card --cov-report=term-missing
|
pytest tests/ -v
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -46,15 +39,11 @@ jobs:
|
|||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: '3.10'
|
||||||
|
|
||||||
- name: Install linting tools
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install ruff
|
|
||||||
|
|
||||||
- name: Run linter
|
- name: Run linter
|
||||||
run: |
|
run: |
|
||||||
|
pip install ruff
|
||||||
ruff check .
|
ruff check .
|
||||||
|
|
||||||
build:
|
build:
|
||||||
@@ -67,17 +56,9 @@ jobs:
|
|||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: '3.10'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install and build
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
python -c "from man_card import cli, man_parser, card_generator, templates, config; print('All modules import successfully')"
|
||||||
- name: Verify build
|
|
||||||
run: |
|
|
||||||
python -c "from man_card import cli; print('CLI module imports successfully')"
|
|
||||||
python -c "from man_card import man_parser; print('man_parser module imports successfully')"
|
|
||||||
python -c "from man_card import card_generator; print('card_generator module imports successfully')"
|
|
||||||
python -c "from man_card import templates; print('templates module imports successfully')"
|
|
||||||
python -c "from man_card import config; print('config module imports successfully')"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user