-
Notifications
You must be signed in to change notification settings - Fork 15
59 lines (53 loc) · 1.71 KB
/
workflow.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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 check --no-fix . --target-version=py38
continue-on-error: true