Skip to content

Commit

Permalink
Run OCR benchmarks on relevant pull rquests too
Browse files Browse the repository at this point in the history
  • Loading branch information
jonchang committed Dec 9, 2024
1 parent 47c51af commit c343d8e
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions .github/workflows/ocr-benchmarks.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: OCR Poetry Benchmark Tests
on:
pull_request:
paths:
- .github/workflows/ocr-benchmarks.yml
- OCR/**
push:
branches:
- main
Expand All @@ -16,6 +20,7 @@ jobs:
python-version: "3.10"
- name: Install dependencies
run: |
sudo apt update && sudo apt install tesseract-ocr-eng tesseract-ocr
cd OCR/tests
python -m pip install --upgrade pip
pip install poetry
Expand All @@ -25,22 +30,3 @@ jobs:
run: |
cd OCR/tests
poetry run pytest benchmark_test.py -v --benchmark-json output.json
# - name: Store benchmark result
# uses: benchmark-action/github-action-benchmark@v1
# with:
# tool: 'pytest'
# output-file-path: OCR/tests/output.json
# auto-push: false
# - name: Push benchmark result
# run: git push 'https://CDCgov:${{ secrets.GITHUB_TOKEN }}@github.com/CDCgov/IDWA.git' gh-pages:gh-pages
# - name: Fetch data.js from gh-pages
# run: |
# git config --global user.name 'GitHub Action'
# git config --global user.email '[email protected]'
# git fetch
# git checkout gh-pages
# rm ./dev/bench/index.html
# cp ./dev/bench/index-template.html ./dev/bench/index.html
# git add .
# git commit -m "template to index"
# git push origin gh-pages

0 comments on commit c343d8e

Please sign in to comment.