From 54c5960d24ccb5430bc17bfc80bbb7b8fa3c8bd7 Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Fri, 6 Feb 2026 07:59:16 +0000 Subject: [PATCH] Add Gitea Actions CI workflow for api-testgen-cli --- .gitea/workflows/ci.yml | 56 +++++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 0571b6b..53f9499 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -2,49 +2,61 @@ name: CI on: push: - branches: [main] + branches: [main, master] pull_request: - branches: [main] + branches: [main, master] jobs: test: runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11"] + steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -e ".[dev]" + pip install -e . - - name: Run pytest - run: pytest tests/ -v + - name: Run unit tests + run: pytest tests/unit/ -v - - name: Run ruff linter - run: ruff check . + - name: Run integration tests + run: pytest tests/integration/ -v - - name: Run black formatter check - run: black --check api_testgen/ + - name: Run tests with coverage + 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 + steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - name: Set up Python + uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: "3.11" - - name: Build package - run: | - pip install build - python -m build + - name: Install linting tools + run: pip install ruff mypy - - name: Verify package - run: | - pip install dist/*.whl - api-testgen --help + - name: Run ruff + run: ruff check . + + - name: Run mypy + run: mypy api_testgen/ --ignore-missing-imports