Skip to content

Commit

Permalink
ci: split tests for local / db [vol.2] (#143) (#148)
Browse files Browse the repository at this point in the history
Authored-by: Borda <https://github.com/Borda> , Shay just merged this.
Co-authored-by: Jirka Borovec <[email protected]>
  • Loading branch information
shaypal5 and Borda authored Feb 2, 2024
1 parent 9a68b3a commit eea7a24
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, macOS-latest, windows-latest]
backend: ['local', 'db']

steps:
- uses: actions/[email protected]
Expand All @@ -31,15 +32,18 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -e . -r tests/requirements.txt
- name: Unit tests
- name: Unit tests (local)
if: matrix.backend == 'local'
run: pytest -m "not mongo"
- name: Unit tests (DB)
if: matrix.backend == 'db'
env:
CACHIER_TEST_HOST: ${{ secrets.CACHIER_TEST_HOST }}
CACHIER_TEST_DB: ${{ secrets.CACHIER_TEST_DB }}
CACHIER_TEST_USERNAME: ${{ secrets.CACHIER_TEST_USERNAME }}
CACHIER_TEST_PASSWORD: ${{ secrets.CACHIER_TEST_PASSWORD }}
CACHIER_TEST_VS_LIVE_MONGO: ${{ secrets.CACHIER_TEST_VS_LIVE_MONGO }}
run: |
pytest
run: pytest -m "mongo"
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v3
with:
Expand Down

0 comments on commit eea7a24

Please sign in to comment.