diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d7c4930..f93bbd8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -106,12 +106,54 @@ jobs: - name: make test run: make test + run-example: + name: ubuntu / 3.8 / run-example / ${{ matrix.example-name }} + strategy: + max-parallel: 4 + fail-fast: false + matrix: + example-name: + - sparv-sbx-sentence-sentiment-kb-sent + 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/${{ matrix.example-name }} + 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 + - run-example runs-on: ubuntu-latest permissions: {} steps: