From 27268cf63ccc37cbb88fa4fb7eac50c5862266fd Mon Sep 17 00:00:00 2001 From: Sidney Richards Date: Wed, 4 Sep 2024 16:21:45 +0200 Subject: [PATCH] fixup! Run openklant client tests in CI --- .github/workflows/ci.yml | 51 ++-------------------------------------- 1 file changed, 2 insertions(+), 49 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4a56baea7..dc6cdadcdd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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* @@ -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 #