Skip to content

Commit

Permalink
Add Windows test runner (#21)
Browse files Browse the repository at this point in the history
* run on both ubuntu and windows
  • Loading branch information
iammosespaulr authored Dec 10, 2024
1 parent 5e2ef20 commit 45d99ac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,24 @@ env:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v3

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install python dependencies

- name: Install Python dependencies
run: |
pip install poetry
poetry install
- name: Run detection benchmark test
run: |
poetry run python benchmark.py --max 5 --result_path results --pdftext_only
poetry run python scripts/verify_benchmark_scores.py results/results.json
poetry run python scripts/verify_benchmark_scores.py results/results.json
2 changes: 1 addition & 1 deletion benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def main():
row = dataset[i]
pdf = row["pdf"]
tool_pages = {}
with tempfile.NamedTemporaryFile(suffix=".pdf") as f:
with tempfile.NamedTemporaryFile(suffix=".pdf", delete=False) as f:
f.write(pdf)
f.seek(0)
pdf_path = f.name
Expand Down

0 comments on commit 45d99ac

Please sign in to comment.