From 51d5f08c2fbf8313f2e41c543fcc95fb77fa16ef Mon Sep 17 00:00:00 2001 From: Ron Rise Date: Wed, 15 Oct 2025 20:44:49 -0400 Subject: [PATCH 1/7] chore: update test configurations and ignore files for coverage reporting --- .dockerignore | 3 +- .gitea/workflows/tests.yml | 24 ++++++++++---- .gitignore | 4 ++- .gitlab-ci.yml | 5 --- .gitlab/ci/libraries.yml | 15 --------- .gitlab/ci/stages.yml | 3 -- .gitlab/ci/tests.yml | 65 -------------------------------------- 7 files changed, 22 insertions(+), 97 deletions(-) delete mode 100644 .gitlab-ci.yml delete mode 100644 .gitlab/ci/libraries.yml delete mode 100644 .gitlab/ci/stages.yml delete mode 100644 .gitlab/ci/tests.yml diff --git a/.dockerignore b/.dockerignore index 1d86eeb..703fc3d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,5 @@ .idea/ .DS_Store vendor/ -.phpunit.cache/ \ No newline at end of file +.phpunit.cache/ +tests/ \ No newline at end of file diff --git a/.gitea/workflows/tests.yml b/.gitea/workflows/tests.yml index 2287a00..3599815 100644 --- a/.gitea/workflows/tests.yml +++ b/.gitea/workflows/tests.yml @@ -246,10 +246,20 @@ jobs: siteworxpro/composer \ install --ignore-platform-reqs --no-interaction --prefer-dist --optimize-autoloader - - name: Run Unit Tests - run: | - docker run --rm \ - --volumes-from ${{ env.JOB_CONTAINER_NAME }} \ - -w ${{ github.workspace }} \ - siteworxpro/composer \ - run tests:unit + - name: ๐Ÿงช โœ… Run Unit Tests + uses: addnab/docker-run-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + image: siteworxpro/composer + options: --volumes-from ${{ env.JOB_CONTAINER_NAME }} -w ${{ gitea.workspace }} + run: | + bin/pcov.sh + composer run tests:unit:coverage + + - name: ๐Ÿ“ฆ Publish Build Artifacts + uses: christopherhx/gitea-upload-artifact@v4 + with: + name: ${{ github.ref_name }}-junit-coverage.xml + path: tests/reports/junit.xml + retention-days: 1 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1d86eeb..d1a6129 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ .idea/ .DS_Store vendor/ -.phpunit.cache/ \ No newline at end of file +.phpunit.cache/ + +tests/reports/ \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 77ce985..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,5 +0,0 @@ -include: - - local: .gitlab/ci/stages.yml - - local: .gitlab/ci/tests.yml - - local: .gitlab/ci/libraries.yml - diff --git a/.gitlab/ci/libraries.yml b/.gitlab/ci/libraries.yml deleted file mode 100644 index a00f2df..0000000 --- a/.gitlab/ci/libraries.yml +++ /dev/null @@ -1,15 +0,0 @@ -Install Composer Libraries: - stage: libraries - image: siteworxpro/composer:latest - rules: - - if: '$CI_COMMIT_TAG' - when: never - - if: '$CI_PIPELINE_SOURCE == "push"' - when: always - - when: never - script: - - composer install --ignore-platform-reqs - artifacts: - paths: - - vendor/ - expire_in: 1 hour diff --git a/.gitlab/ci/stages.yml b/.gitlab/ci/stages.yml deleted file mode 100644 index b292b2d..0000000 --- a/.gitlab/ci/stages.yml +++ /dev/null @@ -1,3 +0,0 @@ -stages: - - libraries - - tests \ No newline at end of file diff --git a/.gitlab/ci/tests.yml b/.gitlab/ci/tests.yml deleted file mode 100644 index 3849b6a..0000000 --- a/.gitlab/ci/tests.yml +++ /dev/null @@ -1,65 +0,0 @@ -Unit Tests: - stage: tests - needs: - - Install Composer Libraries - rules: - - if: '$CI_COMMIT_TAG' - when: never - - if: '$CI_PIPELINE_SOURCE == "push"' - when: always - - when: never - image: siteworxpro/composer - before_script: | - bin/pcov.sh - script: | - echo "Running unit tests..." - composer run tests:unit:coverage - coverage: '/^\s*Lines:\s*\d+.\d+\%/' - artifacts: - expire_in: 1 day - reports: - junit: tests/reports/junit.xml - paths: - - tests/reports/ - -Run License Check: - stage: tests - needs: - - Install Composer Libraries - rules: - - if: '$CI_COMMIT_TAG' - when: never - - if: '$CI_PIPELINE_SOURCE == "push"' - when: on_success - - when: never - image: siteworxpro/composer - script: - - composer run tests:license - -Run Code Lint: - stage: tests - needs: - - Install Composer Libraries - rules: - - if: '$CI_COMMIT_TAG' - when: never - - if: '$CI_PIPELINE_SOURCE == "push"' - when: on_success - - when: never - image: siteworxpro/composer - script: - - composer run tests:lint - -Run Code Sniffer: - stage: tests - needs: - - Install Composer Libraries - rules: - - if: '$CI_COMMIT_TAG' - when: never - - if: '$CI_PIPELINE_SOURCE == "push"' - when: on_success - - when: never - image: siteworxpro/composer - script: - - composer run tests:phpstan \ No newline at end of file -- 2.49.1 From 47f00ea7595b9f408b46f3d9a85ae98df23df52f Mon Sep 17 00:00:00 2001 From: Ron Rise Date: Wed, 15 Oct 2025 20:48:55 -0400 Subject: [PATCH 2/7] chore: update test configurations and ignore files for coverage reporting --- .gitea/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/tests.yml b/.gitea/workflows/tests.yml index 3599815..635a731 100644 --- a/.gitea/workflows/tests.yml +++ b/.gitea/workflows/tests.yml @@ -260,6 +260,6 @@ jobs: - name: ๐Ÿ“ฆ Publish Build Artifacts uses: christopherhx/gitea-upload-artifact@v4 with: - name: ${{ github.ref_name }}-junit-coverage.xml + name: junit-coverage.xml path: tests/reports/junit.xml retention-days: 1 \ No newline at end of file -- 2.49.1 From 0c9e5ec5611ea8fc9be377e6eb1b56d95b5939af Mon Sep 17 00:00:00 2001 From: Ron Rise Date: Wed, 15 Oct 2025 21:14:01 -0400 Subject: [PATCH 3/7] chore: update test configurations and ignore files for coverage reporting --- .gitea/workflows/tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitea/workflows/tests.yml b/.gitea/workflows/tests.yml index 635a731..f42048d 100644 --- a/.gitea/workflows/tests.yml +++ b/.gitea/workflows/tests.yml @@ -258,8 +258,11 @@ jobs: composer run tests:unit:coverage - name: ๐Ÿ“ฆ Publish Build Artifacts + env: + NODE_TLS_REJECT_UNAUTHORIZED: 0 uses: christopherhx/gitea-upload-artifact@v4 with: + options: --volumes-from ${{ env.JOB_CONTAINER_NAME }} -w ${{ gitea.workspace }} name: junit-coverage.xml path: tests/reports/junit.xml retention-days: 1 \ No newline at end of file -- 2.49.1 From 498442d0875e7d9c9bc2777668555630fc578b6f Mon Sep 17 00:00:00 2001 From: Ron Rise Date: Wed, 15 Oct 2025 21:46:07 -0400 Subject: [PATCH 4/7] chore: update test report publishing step in CI configuration --- .gitea/workflows/tests.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/tests.yml b/.gitea/workflows/tests.yml index f42048d..6c033ee 100644 --- a/.gitea/workflows/tests.yml +++ b/.gitea/workflows/tests.yml @@ -257,12 +257,18 @@ jobs: bin/pcov.sh composer run tests:unit:coverage - - name: ๐Ÿ“ฆ Publish Build Artifacts - env: - NODE_TLS_REJECT_UNAUTHORIZED: 0 - uses: christopherhx/gitea-upload-artifact@v4 + - name: Publish Test Report + uses: mikepenz/action-junit-report@v5 + if: success() || failure() # always run even if the previous step fails with: - options: --volumes-from ${{ env.JOB_CONTAINER_NAME }} -w ${{ gitea.workspace }} - name: junit-coverage.xml - path: tests/reports/junit.xml - retention-days: 1 \ No newline at end of file + report_paths: 'tests/reports/junit.xml' + +# - name: ๐Ÿ“ฆ Publish Build Artifacts +# env: +# NODE_TLS_REJECT_UNAUTHORIZED: 0 +# uses: christopherhx/gitea-upload-artifact@v4 +# with: +# options: --volumes-from ${{ env.JOB_CONTAINER_NAME }} -w ${{ gitea.workspace }} +# name: junit-coverage.xml +# path: tests/reports/junit.xml +# retention-days: 1 \ No newline at end of file -- 2.49.1 From aefe68a050d6a3263f5c60c3b1df86b5d86f823a Mon Sep 17 00:00:00 2001 From: Ron Rise Date: Wed, 15 Oct 2025 21:51:29 -0400 Subject: [PATCH 5/7] chore: update test report publishing step in CI configuration --- .gitea/workflows/tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitea/workflows/tests.yml b/.gitea/workflows/tests.yml index 6c033ee..b270eaa 100644 --- a/.gitea/workflows/tests.yml +++ b/.gitea/workflows/tests.yml @@ -259,8 +259,11 @@ jobs: - name: Publish Test Report uses: mikepenz/action-junit-report@v5 + env: + NODE_TLS_REJECT_UNAUTHORIZED: 0 if: success() || failure() # always run even if the previous step fails with: + include_passed: true report_paths: 'tests/reports/junit.xml' # - name: ๐Ÿ“ฆ Publish Build Artifacts -- 2.49.1 From c020b350f0d5b6c71628cc9c4c2ff69d53dd5210 Mon Sep 17 00:00:00 2001 From: Ron Rise Date: Wed, 15 Oct 2025 21:55:46 -0400 Subject: [PATCH 6/7] chore: update test report publishing step in CI configuration --- .gitea/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/tests.yml b/.gitea/workflows/tests.yml index b270eaa..1005bc3 100644 --- a/.gitea/workflows/tests.yml +++ b/.gitea/workflows/tests.yml @@ -264,6 +264,8 @@ jobs: if: success() || failure() # always run even if the previous step fails with: include_passed: true + comment: true + skip_annotations: false report_paths: 'tests/reports/junit.xml' # - name: ๐Ÿ“ฆ Publish Build Artifacts -- 2.49.1 From 9ff2158061d8666c3459d9e26d1c1ec32351339f Mon Sep 17 00:00:00 2001 From: Ron Rise Date: Thu, 16 Oct 2025 08:39:32 -0400 Subject: [PATCH 7/7] chore: update test report publishing step in CI configuration --- .gitea/workflows/tests.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.gitea/workflows/tests.yml b/.gitea/workflows/tests.yml index 1005bc3..03a945c 100644 --- a/.gitea/workflows/tests.yml +++ b/.gitea/workflows/tests.yml @@ -257,17 +257,6 @@ jobs: bin/pcov.sh composer run tests:unit:coverage - - name: Publish Test Report - uses: mikepenz/action-junit-report@v5 - env: - NODE_TLS_REJECT_UNAUTHORIZED: 0 - if: success() || failure() # always run even if the previous step fails - with: - include_passed: true - comment: true - skip_annotations: false - report_paths: 'tests/reports/junit.xml' - # - name: ๐Ÿ“ฆ Publish Build Artifacts # env: # NODE_TLS_REJECT_UNAUTHORIZED: 0 -- 2.49.1