docs: Add --estimate-cost feature documentation and bump version to 0… #57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Python package | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - 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,test]" | |
| - name: Install Playwright browsers | |
| run: | | |
| playwright install chromium | |
| playwright install-deps chromium | |
| - name: Lint with ruff | |
| run: | | |
| ruff check apias/ tests/ | |
| - name: Format check with ruff | |
| run: | | |
| ruff format --check apias/ tests/ | |
| - name: Type check with mypy | |
| continue-on-error: true | |
| run: | | |
| mypy apias/ --ignore-missing-imports | |
| - name: Test with pytest | |
| env: | |
| OPENAI_API_KEY: "sk-test-mock-key-for-ci" | |
| run: | | |
| pytest --cov=apias --cov-report=xml --cov-fail-under=0 | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| # NOTE: PyPI deployment is handled by publish-to-pypi.yml workflow | |
| # Do NOT add a deploy job here to avoid duplicate publishing |