decouple image to text from ocr api (#416) #93
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: OCR Poetry Benchmark Tests | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- .github/workflows/ocr-benchmarks.yml | |
- OCR/** | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
cd OCR/tests | |
python -m pip install --upgrade pip | |
pip install poetry | |
pip install pytest pytest-benchmark | |
poetry install --with dev | |
- name: Run tests | |
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 |