Add Gitea Actions CI workflow for api-testgen-cli
Some checks failed
CI / test (3.10) (push) Failing after 1m10s
CI / test (3.11) (push) Failing after 1m5s
CI / test (3.9) (push) Failing after 1m1s
CI / lint (push) Failing after 47s

This commit is contained in:
2026-02-06 07:59:16 +00:00
parent 5a86c139de
commit 54c5960d24

View File

@@ -2,49 +2,61 @@ name: CI
on: on:
push: push:
branches: [main] branches: [main, master]
pull_request: pull_request:
branches: [main] branches: [main, master]
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-python@v5 - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with: with:
python-version: '3.11' python-version: ${{ matrix.python-version }}
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install -e ".[dev]" pip install -e .
- name: Run pytest - name: Run unit tests
run: pytest tests/ -v run: pytest tests/unit/ -v
- name: Run ruff linter - name: Run integration tests
run: ruff check . run: pytest tests/integration/ -v
- name: Run black formatter check - name: Run tests with coverage
run: black --check api_testgen/ run: python -m pytest tests/ --cov=api_testgen
build: - name: Upload coverage report
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
fail_ci_if_error: false
lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-python@v5 - name: Set up Python
uses: actions/setup-python@v5
with: with:
python-version: '3.11' python-version: "3.11"
- name: Build package - name: Install linting tools
run: | run: pip install ruff mypy
pip install build
python -m build
- name: Verify package - name: Run ruff
run: | run: ruff check .
pip install dist/*.whl
api-testgen --help - name: Run mypy
run: mypy api_testgen/ --ignore-missing-imports