Skip to content

Commit

Permalink
fixup! 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 1ee294f commit 27268cf
Showing 1 changed file with 2 additions and 49 deletions.
51 changes: 2 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
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
pytest --block-network --record-mode=none src/openklant2
coverage run pytest --block-network --record-mode=none src/openklant2
else
echo "Error: Unknown test type '${{ matrix.test-type }}'"
exit 1
Expand All @@ -83,7 +83,6 @@ jobs:
DB_PASSWORD: ''
- name: Persist coverage data files
uses: actions/upload-artifact@v4
if: ${{ matrix.test-type != 'openklant' }}
with:
name: ${{ matrix.test-type }}
path: .coverage*
Expand All @@ -110,59 +109,13 @@ 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
with:
token: ${{ secrets.CODECOV_TOKEN }}

#
# OpenKlant client tests
#
# setup-python-with-uv:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3

# - name: Set up Python
# uses: actions/setup-python@v5
# id: setup_python
# with:
# python-version: 3.11

# - name: Install uv (pip alternative)
# id: setup_uv
# run: |
# pip install uv
# cache_dependency_path="./requirements/*.txt"
# ubuntu_version=$(lsb_release -rs)
# restore_key="uv-${{ runner.os }}-Ubuntu-${ubuntu_version}-python-${{ steps.setup_python.outputs.python-version }}"
# echo "uv_cache_dir=$(uv cache dir)" >> "$GITHUB_OUTPUT"
# echo "cache_dependency_path=${cache_dependency_path}" >> "$GITHUB_OUTPUT"
# echo "cache_restore_key=${restore_key}" >> "$GITHUB_OUTPUT"
# shell: bash

# - name: (Restore) uv cache
# uses: actions/cache@v4
# with:
# path: ${{ steps.setup_uv.outputs.uv_cache_dir }}
# key: ${{ steps.setup_uv.outputs.cache_restore_key }}-${{ hashFiles(steps.setup_uv.outputs.cache_dependency_path) }}
# restore-keys: |
# ${{ steps.setup_uv.outputs.cache_restore_key }}-
# save-always: 'true'

# - name: Install backend dependencies
# run: |
# uv pip install \
# --system \
# -r requirements/ci.txt
# shell: bash
# - name: Run tests
# run: |
# pytest --block-network --record-mode=none
# working-directory: src/openklant2
# shell: bash

#
# End-to-end tests
#
Expand Down

0 comments on commit 27268cf

Please sign in to comment.