From 2329a1ab294eb066f856a65c482698d9713244d7 Mon Sep 17 00:00:00 2001 From: Nikola Ivanovski Date: Fri, 22 Mar 2024 12:33:16 +0200 Subject: [PATCH] OXDEV-7990 Update GHA workflow --- .github/oxid-esales/module-evat.yml | 67 +++++ .github/workflows/development.yml | 363 -------------------------- .github/workflows/dispatch_module.yml | 122 +++++++++ .github/workflows/pull_module_71x.yml | 24 ++ .github/workflows/push_module_71x.yml | 24 ++ .github/workflows/schedule.yml | 23 ++ .github/workflows/trigger.yml | 39 --- composer.json | 2 + 8 files changed, 262 insertions(+), 402 deletions(-) create mode 100644 .github/oxid-esales/module-evat.yml delete mode 100644 .github/workflows/development.yml create mode 100644 .github/workflows/dispatch_module.yml create mode 100644 .github/workflows/pull_module_71x.yml create mode 100644 .github/workflows/push_module_71x.yml create mode 100644 .github/workflows/schedule.yml delete mode 100644 .github/workflows/trigger.yml diff --git a/.github/oxid-esales/module-evat.yml b/.github/oxid-esales/module-evat.yml new file mode 100644 index 00000000..95d297cc --- /dev/null +++ b/.github/oxid-esales/module-evat.yml @@ -0,0 +1,67 @@ +# {{ $ids := "oevattbe" }}ids: {{ print $ids }} +# {{ $org := "oxid-esales" }}organisation: {{ print $org }} +# {{ $name := "evat-module" }}name: {{ print $name }} +# {{ $order := "01" }}order: {{ print $order }} +prepare_shop: + git: + shop_ref: '{{ .Data.global.git.default_ref }}' + custom_ini: + xdebug: 'xdebug.mode=debug,profile,coverage' + +install_module: + matrix: + testplan: '["-"]' + title: '{{ print $name }}-{{ print $order }}' + cache: + prefix: &install_module_prefix 'moduleInstallation-ce-{{ .Github.SHA }}-{{ .Github.RunID }}' + ids: &ids '{{ print $ids }}' + activate: *ids + git: + module: + url: &git_module_url '{{ .Github.Repository }}' + ref: 'b-7.1.x-tests' + package_name: &package_name '{{ print $org }}/{{ print $name }}' + path: *ids + +phpunit: + matrix: + testplan: '["~/defaults/module_phpunit_unit.yml","~/defaults/module_phpunit_integration.yml"]' + load_shop: *install_module_prefix + +codeception: + matrix: + testplan: 'skip' + title: '{{ print $name }}-{{ print $order }}' + load_shop: *install_module_prefix + +runtest: + matrix: + testplan: 'skip' + title: '{{ print $name }}-{{ print $order }}' + load_shop: *install_module_prefix + +sonarcloud: + matrix: + testplan: '["-"]' + title: '{{ print $name }}-{{ print $order }}' + project_key: 'OXID-eSales_vat_tbe_services' + project_name: *package_name + parameters: | + -Dsonar.language=php + -Dsonar.scm.provider=git + -Dsonar.sources=src + -Dsonar.tests=tests + +phpcs_tests: + skip: true + +styles: + matrix: + testplan: '["-"]' + title: '{{ print $name }}-{{ print $order }}' + load_shop: *install_module_prefix + path: *ids + module_ids: *ids + +finish: + slack_title: 'Module {{ print $name }} ({{ .Github.RefName }}) on {{ .Github.Repository }} by {{ .Github.Actor }}' diff --git a/.github/workflows/development.yml b/.github/workflows/development.yml deleted file mode 100644 index 87fe7705..00000000 --- a/.github/workflows/development.yml +++ /dev/null @@ -1,363 +0,0 @@ -name: Development - -on: - workflow_call: - inputs: - php: - required: true - type: string - mysql: - required: true - type: string - template_engine: - type: string - default: 'both' - report_sonarcloud: - type: boolean - default: false - report_slack: - type: boolean - default: true - - workflow_dispatch: - inputs: - php: - description: 'PHP version' - required: true - default: '8.0' - type: choice - options: - - '8.0' - - '8.1' - mysql: - description: 'MySQL version' - required: true - default: '5.7.37' - type: choice - options: - - '5.7.37' - - '8.0' - template_engine: - description: 'Template engine - smarty with flow theme, twig with twig theme' - required: true - default: 'both' - type: choice - options: - - 'both' - - 'twig' - - 'smarty' - report_sonarcloud: - description: 'Trigger sonarcloud analize?' - required: true - default: true - type: boolean - -env: - PACKAGE_NAME: 'oxid-esales/evat-module' - MODULE_ID: 'oevattbe' - SONARCLOUD_ORGANIZATION: 'oxid-esales' - SONARCLOUD_PROJECT_KEY: 'OXID-eSales_vat_tbe_services' - -jobs: - install_shop_with_module: - runs-on: ubuntu-latest - steps: - - name: Clone testing environment - run: git clone https://github.com/OXID-eSales/docker-eshop-sdk.git . - - - name: Clone the shop - run: git clone --depth 1 https://github.com/OXID-eSales/oxideshop_ce.git --branch b-7.0.x --single-branch source - - - name: Cache current installation - uses: actions/cache@v3 - with: - path: | - ./* - key: installation-${{ github.sha }}-${{ join(inputs.*, '-') }}-${{ github.run_number }}-${{ github.run_attempt }} - - - name: Prepare container configuration - run: | - make setup - make addbasicservices - - perl -pi\ - -e 's#PHP_VERSION=.*#PHP_VERSION=${{ inputs.php }}#g;'\ - -e "s#MYSQL_VERSION=.*#MYSQL_VERSION=${{ inputs.mysql }}#g;"\ - .env - - perl -pi\ - -e 's#display_errors =.*#display_errors = false#g;'\ - -e 's#error_reporting = .*#error_reporting = E_ALL ^ E_WARNING ^ E_DEPRECATED#g;'\ - -e 'print "xdebug.max_nesting_level=1000\nxdebug.mode=coverage\n\n"'\ - containers/php/custom.ini - - perl -pi\ - -e 's#/var/www/#/var/www/source/#g;'\ - containers/httpd/project.conf - - - name: Prepare shop configuration - run: | - cp source/source/config.inc.php.dist source/source/config.inc.php - perl -pi\ - -e 's##mysql#g;'\ - -e 's##root#g;'\ - -e 's##example#g;'\ - -e 's##root#g;'\ - -e 's##3306#g;'\ - -e 's##http://localhost.local/#g;'\ - -e 's##/var/www/source/#g;'\ - -e 's##/var/www/source/tmp/#g;'\ - -e 's#iDebug = 0;#iDebug = -1;#g;'\ - source/source/config.inc.php - - - name: Checkout current module - uses: actions/checkout@v3 - with: - path: source/test-module - - - name: Start containers - run: | - make up - sleep 2 - - - name: Install module - run: | - docker-compose exec -T \ - php composer config repositories.${{ env.PACKAGE_NAME }} \ - --json '{"type":"path", "url":"./test-module", "options": {"symlink": true}}' - docker-compose exec -T \ - php composer require ${{ env.PACKAGE_NAME }}:* --no-interaction --no-update - - - name: Install dependencies and reset shop - run: | - docker-compose exec -T php composer update --no-interaction - docker-compose exec -T php bin/oe-console oe:database:reset \ - --db-host=mysql --db-port=3306 --db-name=example --db-user=root --db-password=root --force - docker-compose exec -T php bin/oe-console oe:module:activate ${{ env.MODULE_ID }} - - - name: Install module dependencies - run: | - docker-compose exec -T \ - --workdir=/var/www/test-module \ - php composer install - - - name: Stop containers - run: | - make down - sleep 2 - - - name: Show docker log - if: always() - run: | - docker-compose logs - - - name: Upload configuration artifacts - if: always() - uses: actions/upload-artifact@v3 - with: - name: Configs-${{ inputs.php }}-${{ inputs.mysql }}-${{ inputs.template_engine }} - path: | - docker-compose.yml - source/composer.json - source/composer.lock - source/source/config.inc.php - - integration_tests: - needs: [ install_shop_with_module ] - runs-on: ubuntu-latest - steps: - - name: Load current installation from cache - uses: actions/cache@v3 - with: - fail-on-cache-miss: true - path: | - ./* - key: installation-${{ github.sha }}-${{ join(inputs.*, '-') }}-${{ github.run_number }}-${{ github.run_attempt }} - restore-keys: | - installation-${{ github.sha }}-${{ join(inputs.*, '-') }}-${{ github.run_number }}-${{ github.run_attempt }} - installation-${{ github.sha }}-${{ join(inputs.*, '-') }}-${{ github.run_number }} - - - name: Start containers - run: | - make up - sleep 2 - - - name: Run tests - run: | - docker-compose exec -T \ - -e XDEBUG_MODE=coverage \ - --workdir=/var/www/test-module \ - php php vendor/bin/phpunit \ - -c tests/phpunit.xml \ - --testsuite=Integration \ - --bootstrap=/var/www/source/bootstrap.php \ - --coverage-text \ - --coverage-php=/var/www/integration.cov - - - name: Upload log artifact - if: always() - uses: actions/upload-artifact@v3 - with: - name: ModuleIntegrationTestsLog-${{ inputs.php }}-${{ inputs.mysql }}-${{ inputs.template_engine }} - path: | - source/integration.cov - source/source/log/oxideshop.log - data/php/logs/error_log.txt - - - name: Stop containers - if: always() - run: | - make down - sleep 2 - - unit_tests: - needs: [ install_shop_with_module ] - runs-on: ubuntu-latest - steps: - - name: Load current installation from cache - uses: actions/cache@v3 - with: - fail-on-cache-miss: true - path: | - ./* - key: installation-${{ github.sha }}-${{ join(inputs.*, '-') }}-${{ github.run_number }}-${{ github.run_attempt }} - restore-keys: | - installation-${{ github.sha }}-${{ join(inputs.*, '-') }}-${{ github.run_number }}-${{ github.run_attempt }} - installation-${{ github.sha }}-${{ join(inputs.*, '-') }}-${{ github.run_number }} - - - name: Start containers - run: | - make up - sleep 2 - - - name: Run tests - run: | - docker-compose exec -T \ - -e XDEBUG_MODE=coverage \ - --workdir=/var/www/test-module \ - php php vendor/bin/phpunit \ - -c tests/phpunit.xml \ - --testsuite=Unit \ - --coverage-text \ - --coverage-php=/var/www/unit.cov - - - name: Upload log artifact - if: always() - uses: actions/upload-artifact@v3 - with: - name: ModuleUnitTestsLog-${{ inputs.php }}-${{ inputs.mysql }}-${{ inputs.template_engine }} - path: | - source/unit.cov - source/source/log/oxideshop.log - data/php/logs/error_log.txt - - - name: Stop containers - if: always() - run: | - make down - sleep 2 - - prepare_coverage_results: - needs: [ unit_tests, integration_tests ] - if: ${{ always() && inputs.report_sonarcloud }} - runs-on: ubuntu-latest - steps: - - name: Load current installation from cache - uses: actions/cache@v3 - with: - fail-on-cache-miss: true - path: | - ./* - key: installation-${{ github.sha }}-${{ join(inputs.*, '-') }}-${{ github.run_number }}-${{ github.run_attempt }} - restore-keys: | - installation-${{ github.sha }}-${{ join(inputs.*, '-') }}-${{ github.run_number }}-${{ github.run_attempt }} - installation-${{ github.sha }}-${{ join(inputs.*, '-') }}-${{ github.run_number }} - - - name: Download unit artifacts - uses: actions/download-artifact@v3 - with: - name: ModuleUnitTestsLog-${{ inputs.php }}-${{ inputs.mysql }}-${{ inputs.template_engine }} - path: ./source/coverage/ - - - name: Download integration artifacts - uses: actions/download-artifact@v3 - with: - name: ModuleIntegrationTestsLog-${{ inputs.php }}-${{ inputs.mysql }}-${{ inputs.template_engine }} - path: ./source/coverage/ - - - name: Start containers - run: | - make up - sleep 2 - - - name: Collect and merge coverage reports - continue-on-error: true - run: | - ls -alh source/coverage - wget https://phar.phpunit.de/phpcov-8.2.1.phar - mv phpcov-8.2.1.phar source/phpcov.phar - docker-compose exec -T php php phpcov.phar merge --clover coverage.xml ./coverage - perl -pi -e 's#/var/www/test-module/#./#g;' source/coverage.xml - - - name: Upload log artifact - uses: actions/upload-artifact@v3 - with: - name: TestsLog-${{ inputs.php }}-${{ inputs.mysql }} - path: source/coverage.xml - - sonarcloud: - needs: [ prepare_coverage_results ] - if: ${{ always() && inputs.report_sonarcloud }} - runs-on: ubuntu-latest - steps: - - name: Checkout current module - uses: actions/checkout@v3 - - - name: Download TestsLog artifacts - continue-on-error: true - uses: actions/download-artifact@v3 - with: - name: TestsLog-${{ inputs.php }}-${{ inputs.mysql }} - path: ./tests/ - - - name: SonarCloud Scan - uses: sonarsource/sonarcloud-github-action@master - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - args: > - -Dsonar.organization=${{ env.SONARCLOUD_ORGANIZATION }} - -Dsonar.projectKey=${{ env.SONARCLOUD_PROJECT_KEY }} - -Dsonar.sources=src - -Dsonar.tests=tests - -Dsonar.sourceEncoding=UTF-8 - -Dsonar.php.coverage.reportPaths=tests/coverage.xml - -Dsonar.cpd.php.minimumTokens=25 - -Dsonar.cpd.php.minimumLines=5 - - notify_slack: - needs: [ unit_tests, integration_tests ] - runs-on: ubuntu-latest - if: always() - steps: - - name: Send custom JSON data to Slack workflow - uses: slackapi/slack-github-action@v1.23.0 - with: - payload: > - { "text": " - ${{ github.event_name == 'workflow_dispatch' && 'Manual run of' || 'Scheduled run of' }} ${{ github.workflow }} on ${{ github.repository }} by ${{ github.actor }} - ${{ (needs.unit_tests.result=='success' && needs.integration_tests.result=='success') && 'Successful' || 'Failed' }} - ", "blocks": [ { "type": "header","text": { "type": "plain_text", "emoji": true, "text": " - ${{ github.event_name == 'workflow_dispatch' && 'Manual run of' || 'Scheduled' }} ${{ github.workflow }} on ${{ github.repository }} by ${{ github.actor }} - " } },{ "type": "section","fields": [ { "type": "mrkdwn","text": " - *Status:* ${{ (needs.unit_tests.result=='success' && needs.integration_tests.result=='success') && ':white_check_mark:' || ':x:' }} - " },{ "type": "mrkdwn","text": " - Repository: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.repository }}/actions/runs/${{ github.run_id }}> - " } ] },{ "type": "section", "text": { "type": "mrkdwn", "text": " - \n* Unit ${{ (needs.unit_tests.result=='success') && ':white_check_mark:' || ':x:' }} - \n* Integration ${{ (needs.integration_tests.result=='success') && ':white_check_mark:' || ':x:' }} - " } }, { "type": "divider" } ] } - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK diff --git a/.github/workflows/dispatch_module.yml b/.github/workflows/dispatch_module.yml new file mode 100644 index 00000000..cb4d5388 --- /dev/null +++ b/.github/workflows/dispatch_module.yml @@ -0,0 +1,122 @@ +name: Manual trigger +# Matrix workflow using re-usable github actions + +on: + workflow_dispatch: + inputs: + scenario: + type: choice + options: + - 7.1.x + - 8.0.x + - use custom testplan + default: '7.1.x' + description: 'Choose test scenario' + limit: + type: choice + options: + - 'no' + - 'PHP8.1/MySQL5.7' + - 'PHP8.1/MySQL8.0' + - 'PHP8.2/MySQL5.7' + - 'PHP8.2/MySQL8.0' + - 'PHP8.3/MySQL5.7' + - 'PHP8.3/MySQL8.0' + default: 'PHP8.1/MySQL5.7' + description: 'Limit to one PHP/MySQL combination' + custom_testplan: + type: string + required: true + description: 'URL/PATH of the testplan to run' + default: '~/defaults/7.1.x.yml,~/module-evat.yml' + runs_on: + type: string + description: 'JSON string/array describing the runner' + required: true + default: '"ubuntu-latest"' + use_dev_version: + type: choice + options: ['no', 'v0'] + description: 'Use the dev version of github actions' + default: 'no' + +jobs: + build_testplan: + runs-on: ${{ fromJson(inputs.runs_on) }} + outputs: + testplan: '${{ steps.build.outputs.testplan }}' + steps: + - name: 'Build testplan' + id: build + run: | + # Build testplan + # shellcheck disable=SC2088 # Tilde expansion happens in the workflow and not by bash + case '${{inputs.limit}}' in + "no") LIMIT='';; + "PHP8.1/MySQL5.7") LIMIT='~/defaults/php8.1_mysql5.7_only.yml,' ;; + "PHP8.1/MySQL8.0") LIMIT='~/defaults/php8.1_mysql8.0_only.yml,' ;; + "PHP8.2/MySQL5.7") LIMIT='~/defaults/php8.2_mysql5.7_only.yml,' ;; + "PHP8.2/MySQL8.0") LIMIT='~/defaults/php8.2_mysql8.0_only.yml,' ;; + "PHP8.3/MySQL5.7") LIMIT='~/defaults/php8.3_mysql5.7_only.yml,' ;; + "PHP8.3/MySQL8.0") LIMIT='~/defaults/php8.3_mysql8.0_only.yml,' ;; + *) echo "Illegal choice, fix the workflow" + exit 1 + ;; + esac + case '${{ inputs.scenario}}' in + "7.1.x") + # shellcheck disable=SC2088 # Tilde expansion happens in the workflow and not by bash + TESTPLAN="~/defaults/7.1.x.yml,${LIMIT}~/module-evat.yml" + ;; + "8.0.x") + # shellcheck disable=SC2088 # Tilde expansion happens in the workflow and not by bash + TESTPLAN="${LIMIT}~/module-evat.yml" + ;; + "use custom testplan") + # shellcheck disable=SC2088 # Tilde expansion happens in the workflow and not by bash + TESTPLAN="${{ inputs.custom_testplan }}" + ;; + *) + echo "Illegal choice, fix the workflow" + exit 1 + ;; + esac + echo "testplan=${TESTPLAN}" | tee -a "${GITHUB_OUTPUT}" + + dispatch_stable: + if: ${{ inputs.use_dev_version == 'no' }} + needs: build_testplan + uses: oxid-eSales/github-actions/.github/workflows/call-universal_test_workflow.yml@v4 + with: + testplan: ${{ needs.build_testplan.outputs.testplan }} + runs_on: ${{ inputs.runs_on }} + defaults: 'v4' + plan_folder: '.github/oxid-esales' + secrets: + DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} + DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} + CACHE_ENDPOINT: ${{ secrets.CACHE_ENDPOINT }} + CACHE_ACCESS_KEY: ${{ secrets.CACHE_ACCESS_KEY }} + CACHE_SECRET_KEY: ${{ secrets.CACHE_SECRET_KEY }} + enterprise_github_token: ${{ secrets.enterprise_github_token }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + + dispatch_v0: + if: ${{ inputs.use_dev_version == 'v0' }} + needs: build_testplan + uses: oxid-eSales/github-actions/.github/workflows/call-universal_test_workflow.yml@v0 + with: + testplan: ${{ needs.build_testplan.outputs.testplan }} + runs_on: ${{ inputs.runs_on }} + defaults: 'v0' + plan_folder: '.github/oxid-esales' + secrets: + DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} + DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} + CACHE_ENDPOINT: ${{ secrets.CACHE_ENDPOINT }} + CACHE_ACCESS_KEY: ${{ secrets.CACHE_ACCESS_KEY }} + CACHE_SECRET_KEY: ${{ secrets.CACHE_SECRET_KEY }} + enterprise_github_token: ${{ secrets.enterprise_github_token }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/pull_module_71x.yml b/.github/workflows/pull_module_71x.yml new file mode 100644 index 00000000..bdce3917 --- /dev/null +++ b/.github/workflows/pull_module_71x.yml @@ -0,0 +1,24 @@ +name: Auto trigger on PR to 7.1.x* + +on: + pull_request: + branches: + - 'b-7.1.x**' + +jobs: + pull_module: + uses: oxid-eSales/github-actions/.github/workflows/call-universal_test_workflow.yml@v4 + with: + testplan: '~/defaults/7.1.x.yml,~/module-evat.yml' + runs_on: '"ubuntu-latest"' + defaults: 'v4' + plan_folder: '.github/oxid-esales' + secrets: + DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} + DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} + CACHE_ENDPOINT: ${{ secrets.CACHE_ENDPOINT }} + CACHE_ACCESS_KEY: ${{ secrets.CACHE_ACCESS_KEY }} + CACHE_SECRET_KEY: ${{ secrets.CACHE_SECRET_KEY }} + enterprise_github_token: ${{ secrets.enterprise_github_token }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/push_module_71x.yml b/.github/workflows/push_module_71x.yml new file mode 100644 index 00000000..b63c187c --- /dev/null +++ b/.github/workflows/push_module_71x.yml @@ -0,0 +1,24 @@ +name: Auto trigger on Push to 7.1.x* + +on: + push: + branches: + - 'b-7.1.x**' + +jobs: + push_module: + uses: oxid-eSales/github-actions/.github/workflows/call-universal_test_workflow.yml@v4 + with: + testplan: '~/defaults/7.1.x.yml,~/module-evat.yml' + runs_on: '"ubuntu-latest"' + defaults: 'v4' + plan_folder: '.github/oxid-esales' + secrets: + DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} + DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} + CACHE_ENDPOINT: ${{ secrets.CACHE_ENDPOINT }} + CACHE_ACCESS_KEY: ${{ secrets.CACHE_ACCESS_KEY }} + CACHE_SECRET_KEY: ${{ secrets.CACHE_SECRET_KEY }} + enterprise_github_token: ${{ secrets.enterprise_github_token }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/schedule.yml b/.github/workflows/schedule.yml new file mode 100644 index 00000000..4521d233 --- /dev/null +++ b/.github/workflows/schedule.yml @@ -0,0 +1,23 @@ +name: schedule + +on: + schedule: + - cron: '47 4 */7 * *' + +jobs: + call_matrix: + uses: oxid-eSales/github-actions/.github/workflows/call-universal_test_workflow.yml@v4 + with: + testplan: '~/defaults/7.1.x.yml,~/module-evat.yml' + runs_on: '["self-hosted", "x64"]' + defaults: 'v4' + plan_folder: '.github/oxid-esales' + secrets: + DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} + DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} + CACHE_ENDPOINT: ${{ secrets.CACHE_ENDPOINT }} + CACHE_ACCESS_KEY: ${{ secrets.CACHE_ACCESS_KEY }} + CACHE_SECRET_KEY: ${{ secrets.CACHE_SECRET_KEY }} + enterprise_github_token: ${{ secrets.enterprise_github_token }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/trigger.yml b/.github/workflows/trigger.yml deleted file mode 100644 index 7abcb778..00000000 --- a/.github/workflows/trigger.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Trigger - -on: - pull_request: - push: - branches: - - 'b-7.0.x*' - -jobs: - p80m57both: - name: 'Php-8.0-Mysql-5.7' - uses: ./.github/workflows/development.yml - secrets: inherit - with: - php: '8.0' - mysql: '5.7.37' - report_sonarcloud: true - - p81m80both: - name: 'Php-8.1-Mysql-8.0' - uses: ./.github/workflows/development.yml - secrets: inherit - with: - php: '8.1' - mysql: '8.0' - - php_81_ee: - runs-on: ubuntu-latest - steps: - - name: Trigger EE workflow and wait for results - uses: convictional/trigger-workflow-and-wait@v1.6.5 - with: - owner: oxid-esales - repo: module-workflows - github_user: ${{ secrets.CI_USER }} - github_token: ${{ secrets.GH_CI_JENKINS_TOKEN }} - workflow_file_name: evat_workflow.yml - ref: "master" - client_payload: "{\"php\": \"8.1\", \"mysql\": \"8.0\", \"ref\": \"${{ github.ref_name }}\"}" \ No newline at end of file diff --git a/composer.json b/composer.json index cf452586..87e32bd6 100644 --- a/composer.json +++ b/composer.json @@ -25,6 +25,8 @@ } }, "scripts": { + "phpunit-coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text --bootstrap=/var/www/source/bootstrap.php --config=tests/ --coverage-html=tests/reports/coverage", + "tests-unit": "XDEBUG_MODE=coverage vendor/bin/phpunit --config=tests/ --testsuite=Unit", "tests-integration": "XDEBUG_MODE=coverage vendor/bin/phpunit --bootstrap=/var/www/source/bootstrap.php --config=tests/ --testsuite=Integration", "tests-coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text --bootstrap=/var/www/source/bootstrap.php --config=tests/ --coverage-html=tests/Result/CoverageHtml"