Merge pull request #255 from sbintuitions/disable-openai-test #873
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: Run tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| run-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| # 3.11.9, which is picked up by GithubAction by default, doesn't work because of argparse or something... | |
| python-version: ["3.10", "3.11.6", "3.12"] | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY || null }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Poetry | |
| run: | | |
| pipx install poetry | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: "poetry" | |
| cache-dependency-path: "poetry.lock" | |
| - name: Install dependencies | |
| run: | | |
| poetry install --only main,dev --all-extras | |
| - name: Run tests | |
| run: | | |
| poetry run pytest -v -s -m "not (batch_api)" ./tests | |
| lint_check: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install Poetry | |
| run: | | |
| pipx install poetry | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dev dependencies | |
| run: | | |
| poetry install --only dev | |
| - name: Check Ruff | |
| run: | | |
| poetry run ruff check | |
| poetry run ruff format --check | |
| markdown_lint_check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: markdownlint-cli | |
| uses: nosborn/[email protected] | |
| with: | |
| files: docs | |
| config_file: .markdownlint.yaml |