Skip to content

Commit

Permalink
ci: Configure tests selection
Browse files Browse the repository at this point in the history
  • Loading branch information
frascuchon committed Jul 2, 2023
1 parent b252a01 commit 8251f01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ env:
jobs:

run_tests:
name: Run server tests
uses: ./.github/workflows/run-python-tests.yml
with:
testFolders: tests/server
secrets: inherit

build:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/run-python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: Run Argilla python tests
on:
workflow_call:
inputs:
testFolder:
description: "Provide test folders to run"
required: true
type: string
searchEngine:
description: "Backend search engine to use. Available values are 'elasticsearch' and 'opensearch'."
default: elasticsearch
Expand All @@ -24,7 +28,6 @@ env:
CACHE_NUMBER: 5
ALEMBIC_CONFIG: src/argilla/alembic.ini


jobs:
run-python-tests:
name: Argilla python tests
Expand Down Expand Up @@ -94,7 +97,7 @@ jobs:
run: |
pip install -e ".[server,listeners]"
alembic upgrade head
pytest --ignore=tests/server --cov=argilla --cov-report=xml
pytest --cov=argilla --cov-report=xml ${{ inputs.testFolders }}
- name: Upload Coverage to Codecov 📦
uses: codecov/codecov-action@v1
if: inputs.coverageReport
Expand Down

0 comments on commit 8251f01

Please sign in to comment.