diff --git a/.dockerignore b/.dockerignore index 733b05b96..b60c7d6ae 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,6 +2,7 @@ ** # Except the following +!pyproject.toml !app/ !shared/ !endorser/ @@ -9,7 +10,6 @@ !waypoint/ !scripts/ !configuration/ - !LICENSE **/__pycache__/ diff --git a/.github/workflows/continuous-deploy.yml b/.github/workflows/continuous-deploy.yml index 55ddbc637..59cb710d4 100644 --- a/.github/workflows/continuous-deploy.yml +++ b/.github/workflows/continuous-deploy.yml @@ -932,26 +932,6 @@ jobs: OUTPUT_FILE: test_output.xml COVERAGE_FILE: test_coverage.txt - - name: Publish Pytest Report - uses: mikepenz/action-junit-report@v5 - if: steps.pytest.outcome == 'success' - with: - check_name: JUnit Test Report - report_paths: "./pytest/test_output.xml" - fail_on_failure: true - detailed_summary: true - require_passed_tests: true - - - name: Publish Pytest Regression Report - uses: mikepenz/action-junit-report@v5 - if: steps.pytest-init-regression.outcome == 'success' || steps.pytest-run-regression.outcome == 'success' - with: - check_name: JUnit Test Report Regression - report_paths: "./pytest-regression/test_output.xml" - fail_on_failure: true - detailed_summary: true - require_passed_tests: true - - name: Pytest coverage comment if: steps.pytest.outcome == 'success' uses: MishaKav/pytest-coverage-comment@v1.1.53 @@ -976,6 +956,26 @@ jobs: hide-report: ${{ github.event_name != 'pull_request' }} hide-comment: ${{ github.event_name != 'pull_request' }} + - name: Publish Pytest Report + uses: mikepenz/action-junit-report@v5 + if: steps.pytest.outcome == 'success' + with: + check_name: JUnit Test Report + report_paths: "./pytest/test_output.xml" + fail_on_failure: true + detailed_summary: true + require_passed_tests: true + + - name: Publish Pytest Regression Report + uses: mikepenz/action-junit-report@v5 + if: steps.pytest-init-regression.outcome == 'success' || steps.pytest-run-regression.outcome == 'success' + with: + check_name: JUnit Test Report Regression + report_paths: "./pytest-regression/test_output.xml" + fail_on_failure: true + detailed_summary: true + require_passed_tests: true + - name: Helmfile destroy pytest uses: helmfile/helmfile-action@v2.0.2 if: always() diff --git a/.vscode/settings.json b/.vscode/settings.json index dbcaa1af9..f4df5310a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -42,6 +42,7 @@ "isort", "jetstream", "jsonld", + "junitxml", "keyevent", "Lago", "levelname", @@ -68,7 +69,9 @@ "proposalsattach", "prover", "psubscribe", + "pycache", "pydantic", + "pyproject", "pytest", "PYTHONPATH", "reqs", diff --git a/dockerfiles/tests/Dockerfile b/dockerfiles/tests/Dockerfile index 65b7881f9..e0159ebc1 100644 --- a/dockerfiles/tests/Dockerfile +++ b/dockerfiles/tests/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.12-slim -WORKDIR /tests +WORKDIR /cloudapi-tests # Copy the pyproject.toml for each submodule COPY app/pyproject.toml app/ @@ -14,14 +14,14 @@ COPY endorser/poetry.lock endorser/ COPY trustregistry/poetry.lock trustregistry/ COPY waypoint/poetry.lock waypoint/ -# Install all depedencies +# Install all dependencies ARG POETRY_VERSION=1.8.4 RUN pip install --no-cache-dir poetry==${POETRY_VERSION} ENV POETRY_VIRTUALENVS_CREATE=false ARG MODULES="app endorser trustregistry waypoint" RUN for module in ${MODULES}; do \ - cd /tests/$module && poetry install; \ + cd /cloudapi-tests/$module && poetry install; \ done COPY . . diff --git a/pyproject.toml b/pyproject.toml index c0353eff8..231319b31 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,3 @@ omit = ["*/tests/*"] [tool.isort] profile = "black" - -[tool.pytest.ini_options] -addopts = "--junitxml=junit.xml -p no:cacheprovider --cov-report=xml --cov-report=term" -junit_family = "xunit2"