generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IDWA-OCR-97] Benchmark tests and action (#100)
* try benchmarks in gha * try benchmarks in gha * add ./ * add > * add rel path to with option * gh-pages branch and secret * gh-pages branch and secret * change path * change path * change path * add auto-push * make change for another test commit for graph * point to local init fun and not global * end of line * lint * on push main * update readme * change names to workflows * point only to unit tests in workflow --------- Co-authored-by: Derek Dombek <derek.a.dombek.com>
- Loading branch information
1 parent
aab1037
commit 01fcdfb
Showing
6 changed files
with
546 additions
and
409 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
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 bench_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 | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
auto-push: true |
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
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
Oops, something went wrong.