Added README as PyPI publish requires #11
Workflow file for this run
This file contains 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: Lint and Test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' # pre-commit-ci/lite-action only runs here | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- uses: pre-commit/[email protected] | |
- uses: pre-commit-ci/[email protected] | |
if: always() | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
cache: pip | |
- name: Install Python dependencies | |
run: |- | |
pip install uv | |
uv sync | |
uv pip install -e packages/gsm8k -e packages/hotpotqa | |
- name: Run refurb | |
run: | # Go with this until https://github.com/astral-sh/uv/issues/6459 | |
cd src | |
uv run refurb . | |
cd ../packages/gsm8k/src | |
uv run refurb . | |
cd ../../hotpotqa/src | |
uv run refurb . | |
- run: uv run pylint src packages | |
test: | |
runs-on: large-runner | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
cache: pip | |
- name: Install Python dependencies | |
run: |- | |
pip install uv | |
uv sync | |
uv pip install -e packages/gsm8k -e packages/hotpotqa | |
- name: Cache datasets | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/huggingface/datasets | |
key: ${{ runner.os }}-datasets-${{ hashFiles('packages/gsm8k') }}-${{ hashFiles('packages/hotpotqa') }} | |
restore-keys: ${{ runner.os }}-datasets- | |
- run: uv run pytest -n 16 --dist=loadfile # auto only launches 8 workers in CI, despite runners have 16 cores | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} |