Skip to content

Update pre-commit-ci/lite-action action to v1.0.3 #862

Update pre-commit-ci/lite-action action to v1.0.3

Update pre-commit-ci/lite-action action to v1.0.3 #862

Workflow file for this run

name: Lint and Test
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
pre-commit:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' # pre-commit-ci/lite-action only runs here
strategy:
matrix:
python-version: [3.11, 3.12] # Our min and max supported Python versions
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: pre-commit/[email protected]
- uses: pre-commit-ci/[email protected]
if: always()
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11] # Our min supported Python version
steps:
- uses: actions/checkout@v4
- name: Set up uv
run: |-
curl -LsSf https://astral.sh/uv/install.sh | sh
uv python pin ${{ matrix.python-version }}
- run: uv sync --python-preference=only-managed
- run: uv run refurb paperqa tests
- run: uv run pylint paperqa
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11, 3.12] # Our min and max supported Python versions
steps:
- uses: actions/checkout@v4
- name: Set up uv
run: |-
curl -LsSf https://astral.sh/uv/install.sh | sh
uv python pin ${{ matrix.python-version }}
- run: uv sync --python-preference=only-managed
- name: Cache datasets
uses: actions/cache@v4
with:
path: ~/.cache/huggingface/datasets
key: ${{ runner.os }}-datasets-${{ hashFiles('paperqa') }}
restore-keys: ${{ runner.os }}-datasets-
- run: uv run pytest -n auto
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
SEMANTIC_SCHOLAR_API_KEY: ${{ secrets.SEMANTIC_SCHOLAR_API_KEY }}
CROSSREF_API_KEY: ${{ secrets.CROSSREF_API_KEY }}