Skip to content

Commit

Permalink
Run openklant client tests in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
swrichards committed Sep 4, 2024
1 parent 2264fb0 commit 01d0d7d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
test-type: [main, elastic]
test-type: [main, elastic, openklant]

services:
postgres:
Expand Down Expand Up @@ -70,6 +70,8 @@ jobs:
--exclude-tag=elastic
elif [ "${{ matrix.test-type }}" = "elastic" ]; then
coverage run -p src/manage.py test src --tag=elastic --exclude-tag=e2e
elif [ "${{ matrix.test-type }}" = "openklant" ]; then
coverage run -m pytest --block-network --record-mode=none src/openklant2
else
echo "Error: Unknown test type '${{ matrix.test-type }}'"
exit 1
Expand All @@ -95,7 +97,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: '3.11'
- name: Install coverage.py
# We only need coverage, but we need to match the version that was used
# to generate the coverage files. Grab it from the dependencies.
Expand All @@ -107,6 +109,7 @@ jobs:
run: |
mv coverages/main/.coverage* .
mv coverages/elastic/.coverage* .
mv coverages/openklant/.coverage* .
coverage combine
- name: Publish coverage report
uses: codecov/codecov-action@v3
Expand Down Expand Up @@ -166,8 +169,7 @@ jobs:
uses: actions/cache@v3
with:
path: /home/runner/.cache/ms-playwright
key:
${{ runner.os }}-${{ matrix.browser }}-playwright-${{ hashFiles('requirements/ci.txt') }}
key: ${{ runner.os }}-${{ matrix.browser }}-playwright-${{ hashFiles('requirements/ci.txt') }}

- name: Install playwright deps
run: playwright install --with-deps ${{ matrix.browser }}
Expand Down

0 comments on commit 01d0d7d

Please sign in to comment.