diff --git a/.github/workflows/test_coverage.yml b/.github/workflows/test_coverage.yml index 90efcc3..071cf1c 100644 --- a/.github/workflows/test_coverage.yml +++ b/.github/workflows/test_coverage.yml @@ -35,10 +35,11 @@ jobs: run: sleep 10s shell: bash - - name: Run Tests and Build Coverage - run: make test-cov-gh-action + - name: Run Tests + run: docker exec dsp_dev_dspback pytest tests --cov=dspback --cache-clear 2>&1 | tee pytest-coverage.txt - name: Comment coverage + if: success() uses: coroo/pytest-coverage-commentator@v1.0.2 with: pytest-coverage: pytest-coverage.txt diff --git a/Makefile b/Makefile index 1c36766..eada287 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ test-cov: .PHONY: test-cov-gh-action test-cov-gh-action: - docker exec dsp_dev_dspback pytest tests --cov=dspback --cache-clear > pytest-coverage.txt + docker exec dsp_dev_dspback pytest tests --cov=dspback --cache-clear 2>&1 | tee pytest-coverage.txt; exit ${PIPESTATUS[0]} .PHONY: default-env default-env: diff --git a/dspback/routers/external.py b/dspback/routers/external.py index 471d0c7..1b598a6 100644 --- a/dspback/routers/external.py +++ b/dspback/routers/external.py @@ -50,7 +50,7 @@ async def create_metadata_repository(self, request: Request, metadata: request_m ) async def update_metadata(self, request: Request, metadata: request_model, identifier): metadata_json = json.loads(metadata.json()) - return await self.submit(request, identifier, self.wrap_metadata(metadata_json, False)) + return await self.submit(request, identifier, self.wrap_metadata(metadata=metadata_json, published=False, is_public=False)) @router.get( '/metadata/external/{identifier}', @@ -64,7 +64,7 @@ async def get_metadata_repository(self, identifier): submission = self.user.submission(identifier) metadata_json_str = submission.metadata_json metadata_json = json.loads(metadata_json_str) - return self.wrap_metadata(metadata_json, False) + return self.wrap_metadata(metadata=metadata_json, published=False, is_public=False) @router.delete( '/metadata/external/{identifier}',