forked from mindee/doctr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Added CI jobs to check evaluate, collect_env & demo (mindee#456)
* chore: Added CI job to check whether the demo runs * chore: Added CI jobs to check remaining scripts * feat: Added options to run evaluation on limited samples * test: Speeded up evaluation script testing
- Loading branch information
Showing
3 changed files
with
110 additions
and
0 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,49 @@ | ||
name: demo | ||
|
||
on: | ||
push: | ||
branches: main | ||
pull_request: | ||
branches: main | ||
|
||
jobs: | ||
test-demo: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
python: [3.7, 3.8] | ||
steps: | ||
- if: matrix.os == 'macos-latest' | ||
name: Install MacOS prerequisites | ||
run: brew install cairo pango gdk-pixbuf libffi | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
architecture: x64 | ||
- name: Cache python modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('demo/requirements.txt') }}-${{ hashFiles('**/*.py') }} | ||
restore-keys: | | ||
${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('demo/requirements.txt') }}- | ||
${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('requirements.txt') }}- | ||
${{ runner.os }}-pkg-deps-${{ matrix.python }}- | ||
${{ runner.os }}-pkg-deps- | ||
${{ runner.os }}- | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e .[tf] --upgrade | ||
pip install -r demo/requirements.txt | ||
- name: Run demo | ||
run: | | ||
streamlit --version | ||
screen -dm streamlit run demo/app.py | ||
sleep 5 | ||
curl http://localhost:8501 |
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