Skip to content

Commit

Permalink
ci: run example
Browse files Browse the repository at this point in the history
  • Loading branch information
kod-kristoff committed Feb 19, 2024
1 parent 5d4171c commit 7a5f64d
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,49 @@ jobs:
run: pdm sync --dev
- name: make test
run: make test

run-example:
name: Run example
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
#----------------------------------------------
# ----- setup python -----
#----------------------------------------------
- name: Set up the environment
uses: pdm-project/setup-pdm@v4
id: setup-python
with:
python-version: ${{ env.MINIMUM_PYTHON_VERSION }}


- name: Load cached venv
id: cached-venv
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('.github/workflows/ci.yml') }}

- name: Install dependencies
if: steps.cached-venv.outputs.cache-hit != 'true'
run: make install-dev

- name: Run example
run: |
source .venv/bin/activate
cd examples/hello-ocr
echo "" | sparv setup
sparv run
ls -R
# https://github.com/marketplace/actions/alls-green#why used for branch protection checks
test-check:
if: always()
needs:
- coverage
- minimal
- upload-coverage
- run-example
runs-on: ubuntu-latest
permissions: {}
steps:
Expand Down

0 comments on commit 7a5f64d

Please sign in to comment.