Skip to content

Add Unit Tests which Must Pass for Merge to main #10

Add Unit Tests which Must Pass for Merge to main

Add Unit Tests which Must Pass for Merge to main #10

Workflow file for this run

name: PZ Merge Checks
on:
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: Download and register testdata
run: |
pushd testdata
wget -nc https://people.csail.mit.edu/gerarvit/PalimpzestData/enron-eval-tiny.tar.gz
wget -nc https://people.csail.mit.edu/gerarvit/PalimpzestData/real-estate-eval-tiny.tar.gz
tar -xzf enron-eval-tiny.tar.gz
tar -xzf real-estate-eval-tiny.tar.gz
rm *.tar.gz
popd
pz reg --path testdata/enron-eval-tiny --name enron-eval-tiny
pz reg --path testdata/real-estate-eval-tiny --name real-estate-eval-tiny
- name: Test with pytest
env: # Or as an environment variable
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }}
run: |
pip install pytest
pytest -v tests/pytest
lint-and-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install the code linting and formatting tool Ruff
run: pip install "ruff>=0.9.0"
- name: check version
run: ruff --version
- name: Lint code with Ruff
run: ruff check --output-format=github --target-version=py38
- name: Check code formatting with Ruff
run: ruff format --diff --target-version=py38
continue-on-error: true