diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index aa4f2215d48..00000000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,247 +0,0 @@ -name: Coverage -on: - push: - branches: - - '*' - tags: - - '*' - paths: - - '**' - - '!*.md' - pull_request: - paths: - - '**' - - '!*.md' -jobs: - phpunit: - name: PHPUnit - runs-on: ${{ matrix.operating-system }} - strategy: - fail-fast: false - matrix: - operating-system: [ ubuntu-18.04 ] - php: [ 7.4 ] - db: [ pgsql ] - include: - - db: pgsql - database_url: postgres://postgres:password@127.0.0.1:5432/eccube_db - database_server_version: 13 - services: - postgres: - image: postgres:13 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: password - ports: - - 5432:5432 - # needed because the postgres container does not provide a healthcheck - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Setup PHP - uses: nanasess/setup-php@master - with: - php-version: ${{ matrix.php }} - - - name: composer install - run: composer install --dev --no-interaction -o --apcu-autoloader - - - name: Setup EC-CUBE - env: - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - run: | - bin/console doctrine:database:create - bin/console doctrine:schema:create - bin/console eccube:fixtures:load - - - name: PHPUnit - env: - APP_ENV: 'test' - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - MAILER_URL: 'smtp://127.0.0.1:1025' - continue-on-error: true - run: | - bin/phpunit --version - phpdbg -dmemory_limit=-1 -qrr bin/phpunit --exclude-group cache-clear,cache-clear-install,update-schema-doctrine --coverage-clover=coverage1.xml - - name: Upload report - if: success() - uses: actions/upload-artifact@v2 - with: - name: phpunit-reports - path: coverage1.xml - codeception: - name: Codeception - runs-on: ${{ matrix.operating-system }} - strategy: - fail-fast: false - matrix: - operating-system: [ ubuntu-18.04 ] - php: [ 7.3 ] - db: [ pgsql ] - group: [ admin01, admin02, admin03, front, installer ] - include: - - db: pgsql - database_url: postgres://postgres:password@127.0.0.1:5432/eccube_db - database_server_version: 13 - - group: admin01 - app_env: 'codeception' - - group: admin02 - app_env: 'codeception' - - group: admin03 - app_env: 'codeception' - - group: front - app_env: 'codeception' - - group: installer - app_env: 'install' - services: - postgres: - image: postgres:13 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: password - ports: - - 5432:5432 - # needed because the postgres container does not provide a healthcheck - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - - mailcatcher: - image: schickling/mailcatcher - ports: - - 1080:1080 - - 1025:1025 - - steps: - - name: Checkout - uses: actions/checkout@master - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Setup PHP - uses: nanasess/setup-php@master - with: - php-version: ${{ matrix.php }} - - - name: composer install - run: | - sudo composer selfupdate - composer install --dev --no-interaction -o --apcu-autoloader - - name: Setup to EC-CUBE - env: - APP_ENV: ${{ matrix.app_env }} - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - run: | - echo "APP_ENV=${APP_ENV}" > .env - bin/console doctrine:database:create --env=dev - bin/console doctrine:schema:create --env=dev - bin/console eccube:fixtures:load --env=dev - - - name: setup-chromedriver - uses: nanasess/setup-chromedriver@master - - - name: Run chromedriver - run: | - export DISPLAY=:99 - chromedriver --url-base=/wd/hub & - echo ">>> Started chrome-driver" - sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & - echo ">>> Started xvfb" - - - name: Run package-api - run: | - if [[ ! -d ${PWD}/repos ]]; then mkdir -p ${PWD}/repos ; fi - docker run -d --rm -v ${PWD}/repos:/repos -e MOCK_REPO_DIR=/repos -p 8080:8080 eccube/mock-package-api:composer2 - cp codeception/_data/plugins/*-1.0.0.tgz repos - - - name: Setup xdebug - run: | - composer require --dev codeception/c3 "2.*" - sudo phpenmod -s cli xdebug - sed -i "7a include __DIR__.'/c3.php';" index.php - - - name: Start PHP Development Server - env: - APP_ENV: 'codeception' - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - MAILER_URL: 'smtp://127.0.0.1:1025' - ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' - XDEBUG_MODE: coverage - run: php -S 127.0.0.1:8000 & - - - name: Codeception - env: - APP_ENV: ${{ matrix.app_env }} - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - MAILER_URL: 'smtp://127.0.0.1:1025' - ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' - GROUP: ${{ matrix.group }} - SYMFONY_DEPRECATIONS_HELPER: weak - XDEBUG_MODE: coverage - run: vendor/bin/codecept -vvv run acceptance --env chrome,github_action -g ${GROUP} --skip-group excludeCoverage --coverage --coverage-xml - - name: Upload outputs - uses: actions/upload-artifact@v2 - with: - name: codeception-${{ matrix.group }}-evidence - path: codeception/_output/ - - name: Upload report - if: success() - uses: actions/upload-artifact@v2 - with: - name: codeception-${{ matrix.group }}-reports - path: codeception/_output/**/*.xml - - name: Upload logs - if: failure() - uses: actions/upload-artifact@v2 - with: - name: codeception-${{ matrix.group }}-logs - path: var/log/ - - upload: - name: Upload coverage reports - runs-on: ubuntu-latest - needs: [ phpunit, codeception ] - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: actions/download-artifact@v2 - with: - path: reports - - run: | - mv reports/codeception-admin01-reports/acceptance\ \(chrome,\ github_action\).remote.coverage.xml reports/acceptance.admin01.coverage.xml - mv reports/codeception-admin02-reports/acceptance\ \(chrome,\ github_action\).remote.coverage.xml reports/acceptance.admin02.coverage.xml - mv reports/codeception-admin03-reports/acceptance\ \(chrome,\ github_action\).remote.coverage.xml reports/acceptance.admin03.coverage.xml - mv reports/codeception-front-reports/acceptance\ \(chrome,\ github_action\).remote.coverage.xml reports/acceptance.front.coverage.xml - mv reports/codeception-installer-reports/acceptance\ \(chrome,\ github_action\).remote.coverage.xml reports/acceptance.installer.coverage.xml - - name: Upload coverage - uses: codecov/codecov-action@v1 - with: - files: ./reports/phpunit-reports/coverage1.xml,./reports/acceptance.admin01.coverage.xml,./reports/acceptance.admin02.coverage.xml,./reports/acceptance.admin03.coverage.xml,./reports/acceptance.front.coverage.xml,./reports/acceptance.installer.coverage.xml - flags: tests - fail_ci_if_error: true diff --git a/.github/workflows/deny-test.yml b/.github/workflows/deny-test.yml deleted file mode 100644 index 1a3b020ea28..00000000000 --- a/.github/workflows/deny-test.yml +++ /dev/null @@ -1,132 +0,0 @@ -name: Deny check for EC-CUBE -on: - push: - branches: - - '*' - tags: - - '*' - paths: - - '**' - - '!*.md' - pull_request: - paths: - - '**' - - '!*.md' -jobs: - deploy: - name: Deny check - runs-on: ubuntu-18.04 - services: - postgres: - image: postgres:11 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: password - ports: - - 5432:5432 - # needed because the postgres container does not provide a healthcheck - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - steps: - - name: Checkout - uses: actions/checkout@master - - - name: Setup PHP - uses: nanasess/setup-php@master - with: - php-version: '7.3' - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Install to Composer - run: composer install --no-scripts --no-dev --no-interaction --optimize-autoloader - - - name: Translate to templates - run: php bin/template_jp.php - - - name: Setup to EC-CUBE - env: - APP_ENV: 'prod' - DATABASE_URL: postgres://postgres:password@127.0.0.1:5432/eccube_db - DATABASE_SERVER_VERSION: 11 - run: | - rm -rf $GITHUB_WORKSPACE/app/Plugin/* - echo "APP_ENV=${APP_ENV}" > .env - bin/console doctrine:database:create --env=dev - bin/console doctrine:schema:create --env=dev - bin/console eccube:fixtures:load --env=dev - - - name: Install Plugins - env: - APP_ENV: 'prod' - DATABASE_URL: postgres://postgres:password@127.0.0.1:5432/eccube_db - DATABASE_SERVER_VERSION: 11 - run: | - bin/console eccube:composer:require "ec-cube/recommend4" - bin/console eccube:composer:require "ec-cube/coupon4" - bin/console eccube:composer:require "ec-cube/mailmagazine4" - bin/console eccube:composer:require "ec-cube/salesreport4" - bin/console eccube:composer:require "ec-cube/relatedproduct4" - bin/console eccube:composer:require "ec-cube/securitychecker4" - bin/console eccube:composer:require "ec-cube/productreview4" - bin/console eccube:composer:require "ec-cube/api" - bin/console eccube:composer:require "ec-cube/sitekit" - bin/console eccube:composer:require "ec-cube/gmc" - - - name: Pre Install Plugins - env: - PGPASSWORD: 'password' - run: psql eccube_db -h 127.0.0.1 -U postgres -c "select id,name,code,0 as enabled,version,source,0 as initialized,'2021-08-13 00:00:00' as create_date,'2021-08-13 00:00:00' as update_date,discriminator_type from dtb_plugin;" -A -F, --pset footer > src/Eccube/Resource/doctrine/import_csv/ja/dtb_plugin.csv - - - name: Packaging - working-directory: ../ - run: ${{ github.event.repository.name }}/package.sh - - - name: Build Container - run: docker build -t ec-cube --build-arg SKIP_INSTALL_SCRIPT_ON_DOCKER_BUILD=true . - - - name: Container Run - run: | - docker run -e APP_ENV=prod -e APP_DEBUG=0 -e DATABASE_URL="sqlite:///var/eccube.db" -e DATABASE_SERVER_VERSION=3 --rm -d -p 8080:80 --name eccube ec-cube - docker cp ../eccube.tar.gz eccube:/tmp/ - docker exec -w /tmp eccube bash -c "rm -rf /var/www/html; tar xf /tmp/eccube.tar.gz -C /var/www; mv /var/www/ec-cube /var/www/html; chown -R www-data: /var/www/html" - docker exec -u www-data eccube bin/console eccube:install -n - docker exec -u www-data eccube bash -c 'for code in Api Coupon4 GMC MailMagazine4 ProductReview4 Recommend4 RelatedProduct4 SalesReport4 Securitychecker4 SiteKit; do bin/console eccube:plugin:enable --code $code; done' - - - name: setup-chromedriver - uses: nanasess/setup-chromedriver@master - - - name: Prepare test - run: | - export DISPLAY=:99 - chromedriver --url-base=/wd/hub & - echo ">>> Started chrome-driver" - sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & - echo ">>> Started xvfb" - composer install --no-scripts --no-interaction --optimize-autoloader - echo "modules: - enabled: - - REST: - depends: PhpBrowser - url: 'http://127.0.0.1:8080' - config: - WebDriver: - host: '127.0.0.1' - port: 9515 - url: 'http://127.0.0.1:8080'" > codeception/_envs/local.yml - - - name: Run tests - env: - APP_ENV: 'codeception' - DATABASE_URL: postgres://postgres:password@127.0.0.1:5432/eccube_db - DATABASE_SERVER_VERSION: 11 - run: | - vendor/bin/codecept -vvv run acceptance --env chrome,local CL01DenyCest diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 42a39392645..00000000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,148 +0,0 @@ -name: Deploy for EC-CUBE -on: - release: - types: [ published ] -jobs: - deploy: - name: Deploy - runs-on: ubuntu-18.04 - services: - postgres: - image: postgres:11 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: password - ports: - - 5432:5432 - # needed because the postgres container does not provide a healthcheck - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - steps: - - name: Checkout - uses: actions/checkout@master - - - name: Setup PHP - uses: nanasess/setup-php@master - with: - php-version: '7.3' - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Install to Composer - run: composer install --no-scripts --no-dev --no-interaction --optimize-autoloader - - - name: Translate to templates - run: php bin/template_jp.php - - - name: Setup to EC-CUBE - env: - APP_ENV: 'prod' - DATABASE_URL: postgres://postgres:password@127.0.0.1:5432/eccube_db - DATABASE_SERVER_VERSION: 11 - run: | - rm -rf $GITHUB_WORKSPACE/app/Plugin/* - echo "APP_ENV=${APP_ENV}" > .env - bin/console doctrine:database:create --env=dev - bin/console doctrine:schema:create --env=dev - bin/console eccube:fixtures:load --env=dev - - - name: Install Plugins - env: - APP_ENV: 'prod' - DATABASE_URL: postgres://postgres:password@127.0.0.1:5432/eccube_db - DATABASE_SERVER_VERSION: 11 - run: | - bin/console eccube:composer:require "ec-cube/recommend4" - bin/console eccube:composer:require "ec-cube/coupon4" - bin/console eccube:composer:require "ec-cube/mailmagazine4" - bin/console eccube:composer:require "ec-cube/salesreport4" - bin/console eccube:composer:require "ec-cube/relatedproduct4" - bin/console eccube:composer:require "ec-cube/securitychecker4" - bin/console eccube:composer:require "ec-cube/productreview4" - bin/console eccube:composer:require "ec-cube/api" - bin/console eccube:composer:require "ec-cube/sitekit" - bin/console eccube:composer:require "ec-cube/gmc" - - - name: Pre Install Plugins - env: - PGPASSWORD: 'password' - run: psql eccube_db -h 127.0.0.1 -U postgres -c "select id,name,code,0 as enabled,version,source,0 as initialized,'2021-08-13 00:00:00' as create_date,'2021-08-13 00:00:00' as update_date,discriminator_type from dtb_plugin;" -A -F, --pset footer > src/Eccube/Resource/doctrine/import_csv/ja/dtb_plugin.csv - - - name: Packaging - working-directory: ../ - env: - TAG_NAME: ${{ github.event.release.tag_name }} - run: ${{ github.event.repository.name }}/package.sh - - - name: Upload binaries to release of TGZ - uses: svenstaro/upload-release-action@v1-release - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ runner.workspace }}/eccube-${{ github.event.release.tag_name }}.tar.gz - asset_name: eccube-${{ github.event.release.tag_name }}.tar.gz - tag: ${{ github.ref }} - overwrite: true - - name: Upload binaries to release of ZIP - uses: svenstaro/upload-release-action@v1-release - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ runner.workspace }}/eccube-${{ github.event.release.tag_name }}.zip - asset_name: eccube-${{ github.event.release.tag_name }}.zip - tag: ${{ github.ref }} - overwrite: true - - name: Upload binaries to release of TGZ md5 checksum - uses: svenstaro/upload-release-action@v1-release - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ runner.workspace }}/eccube-${{ github.event.release.tag_name }}.tar.gz.checksum.md5 - asset_name: eccube-${{ github.event.release.tag_name }}.tar.gz.checksum.md5 - tag: ${{ github.ref }} - overwrite: true - - name: Upload binaries to release of TGZ sha1 checksum - uses: svenstaro/upload-release-action@v1-release - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ runner.workspace }}/eccube-${{ github.event.release.tag_name }}.tar.gz.checksum.sha1 - asset_name: eccube-${{ github.event.release.tag_name }}.tar.gz.checksum.sha1 - tag: ${{ github.ref }} - overwrite: true - - name: Upload binaries to release of TGZ sha256 checksum - uses: svenstaro/upload-release-action@v1-release - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ runner.workspace }}/eccube-${{ github.event.release.tag_name }}.tar.gz.checksum.sha256 - asset_name: eccube-${{ github.event.release.tag_name }}.tar.gz.checksum.sha256 - tag: ${{ github.ref }} - overwrite: true - - name: Upload binaries to release of ZIP md5 checksum - uses: svenstaro/upload-release-action@v1-release - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ runner.workspace }}/eccube-${{ github.event.release.tag_name }}.zip.checksum.md5 - asset_name: eccube-${{ github.event.release.tag_name }}.zip.checksum.md5 - tag: ${{ github.ref }} - overwrite: true - - name: Upload binaries to release of ZIP sha1 checksum - uses: svenstaro/upload-release-action@v1-release - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ runner.workspace }}/eccube-${{ github.event.release.tag_name }}.zip.checksum.sha1 - asset_name: eccube-${{ github.event.release.tag_name }}.zip.checksum.sha1 - tag: ${{ github.ref }} - overwrite: true - - name: Upload binaries to release of ZIP sha256 checksum - uses: svenstaro/upload-release-action@v1-release - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ runner.workspace }}/eccube-${{ github.event.release.tag_name }}.zip.checksum.sha256 - asset_name: eccube-${{ github.event.release.tag_name }}.zip.checksum.sha256 - tag: ${{ github.ref }} - overwrite: true diff --git a/.github/workflows/dockerbuild.yml b/.github/workflows/dockerbuild.yml deleted file mode 100644 index 930766a5192..00000000000 --- a/.github/workflows/dockerbuild.yml +++ /dev/null @@ -1,112 +0,0 @@ -name: Testing dockerbuild -on: - push: - paths: - - 'Dockerfile' - - 'dockerbuild/*' - - 'docker-compose*.yml' - - '.github/workflows/dockerbuild.yml' - pull_request: - paths: - - 'Dockerfile' - - 'dockerbuild/*' - - 'docker-compose*.yml' - - '.github/workflows/dockerbuild.yml' - -jobs: - dockerbuild: - name: dockerbuild - runs-on: ${{ matrix.operating-system }} - strategy: - fail-fast: false - matrix: - operating-system: [ ubuntu-18.04 ] - php: [ 7.3 ] - db: [ pgsql ] - group: [ admin01 ] - include: - - db: pgsql - database_url: postgres://dbuser:secret@127.0.0.1:15432/eccubedb - database_server_version: 11 - - group: admin01 - app_env: 'codeception' - # - group: admin02 - # app_env: 'codeception' - # - group: admin03 - # app_env: 'codeception' - # - group: front - # app_env: 'codeception' - # - group: installer - # app_env: 'install' - - steps: - - name: Checkout - uses: actions/checkout@master - - - name: docker build - run: docker-compose build - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Setup PHP - uses: nanasess/setup-php@master - with: - php-version: ${{ matrix.php }} - - - name: composer install - run: composer install --dev --no-interaction -o --apcu-autoloader - - name: Setup to EC-CUBE - env: - APP_ENV: ${{ matrix.app_env }} - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - run: | - docker-compose -f docker-compose.yml -f docker-compose.pgsql.yml up -d - docker-compose -f docker-compose.yml -f docker-compose.pgsql.yml exec -T ec-cube bin/console doctrine:schema:create --env=dev - docker-compose -f docker-compose.yml -f docker-compose.pgsql.yml exec -T ec-cube bin/console eccube:fixtures:load --env=dev - sed -i 's!APP_ENV: "dev"!APP_ENV: "prod"!g' docker-compose.yml - docker-compose -f docker-compose.yml -f docker-compose.pgsql.yml up -d - - - name: setup-chromedriver - uses: nanasess/setup-chromedriver@master - - - name: Run chromedriver - run: | - export DISPLAY=:99 - chromedriver --url-base=/wd/hub & - echo ">>> Started chrome-driver" - sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & - echo ">>> Started xvfb" - - - name: Codeception - env: - APP_ENV: ${{ matrix.app_env }} - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - MAILER_URL: 'smtp://127.0.0.1:1025' - GROUP: ${{ matrix.group }} - SYMFONY_DEPRECATIONS_HELPER: weak - run: | - echo "APP_ENV=${APP_ENV}" > .env - vendor/bin/codecept -vvv run acceptance --env chrome,github_action_docker -g ${GROUP} - - name: Upload evidence - if: failure() - uses: actions/upload-artifact@v2 - with: - name: codeception-${{ matrix.group }}-evidence - path: codeception/_output/ - - name: Upload logs - if: failure() - uses: actions/upload-artifact@v2 - with: - name: codeception-${{ matrix.group }}-logs - path: var/log/ diff --git a/.github/workflows/e2e-bc-test.yml b/.github/workflows/e2e-bc-test.yml deleted file mode 100644 index 702c0578ab6..00000000000 --- a/.github/workflows/e2e-bc-test.yml +++ /dev/null @@ -1,134 +0,0 @@ -name: Backward compatibility testing to Front template -on: - push: - branches: - - '*' - tags: - - '*' - paths: - - '**' - - '!*.md' - pull_request: - paths: - - '**' - - '!*.md' -jobs: - codeception: - name: Codeception - runs-on: ${{ matrix.operating-system }} - strategy: - fail-fast: false - matrix: - version: [ 4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.4, 4.0.5 ] - operating-system: [ ubuntu-18.04 ] - php: [ 7.3 ] - db: [ pgsql ] - group: [ front ] - include: - - db: pgsql - database_url: postgres://postgres:password@127.0.0.1:5432/eccube_db - database_server_version: 11 - - group: front - app_env: 'codeception' - - services: - postgres: - image: postgres:11 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: password - ports: - - 5432:5432 - # needed because the postgres container does not provide a healthcheck - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - - mailcatcher: - image: schickling/mailcatcher - ports: - - 1080:1080 - - 1025:1025 - - steps: - - name: Checkout - uses: actions/checkout@master - - - name: Checkout to front templates - env: - ECCUBE_VERSION: ${{ matrix.version }} - run: | - git remote add upstream https://github.com/EC-CUBE/ec-cube.git - git fetch upstream --tags - git checkout refs/tags/${ECCUBE_VERSION} src/Eccube/Resource/template/default - git checkout refs/tags/${ECCUBE_VERSION} html/template/default - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Setup PHP - uses: nanasess/setup-php@master - with: - php-version: ${{ matrix.php }} - - - name: composer install - run: composer install --dev --no-interaction -o --apcu-autoloader - - name: Setup to EC-CUBE - env: - APP_ENV: ${{ matrix.app_env }} - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - run: | - echo "APP_ENV=${APP_ENV}" > .env - bin/console doctrine:database:create --env=dev - bin/console doctrine:schema:create --env=dev - bin/console eccube:fixtures:load --env=dev - - - name: setup-chromedriver - uses: nanasess/setup-chromedriver@master - - - name: Run chromedriver - run: | - export DISPLAY=:99 - chromedriver --url-base=/wd/hub & - echo ">>> Started chrome-driver" - sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & - echo ">>> Started xvfb" - - - name: Start PHP Development Server - env: - APP_ENV: 'codeception' - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - MAILER_URL: 'smtp://127.0.0.1:1025' - ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' - run: php -S 127.0.0.1:8000 & - - - name: Codeception - env: - APP_ENV: ${{ matrix.app_env }} - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - MAILER_URL: 'smtp://127.0.0.1:1025' - ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' - GROUP: ${{ matrix.group }} - SYMFONY_DEPRECATIONS_HELPER: weak - run: vendor/bin/codecept -vvv run acceptance --env chrome,github_action -g ${GROUP} - - name: Upload evidence - if: failure() - uses: actions/upload-artifact@v2 - with: - name: codeception-${{ matrix.group }}-evidence - path: codeception/_output/ - - name: Upload logs - if: failure() - uses: actions/upload-artifact@v2 - with: - name: codeception-${{ matrix.group }}-logs - path: var/log/ diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml deleted file mode 100644 index 852595198eb..00000000000 --- a/.github/workflows/e2e-test.yml +++ /dev/null @@ -1,137 +0,0 @@ -name: E2E test for EC-CUBE -on: - push: - branches: - - '*' - tags: - - '*' - paths: - - '**' - - '!*.md' - pull_request: - paths: - - '**' - - '!*.md' -jobs: - codeception: - name: Codeception - runs-on: ${{ matrix.operating-system }} - strategy: - fail-fast: false - matrix: - operating-system: [ ubuntu-18.04 ] - php: [ 7.3 ] - db: [ pgsql ] - group: [ admin01, admin02, admin03, front, installer ] - include: - - db: pgsql - database_url: postgres://postgres:password@127.0.0.1:5432/eccube_db - database_server_version: 11 - - group: admin01 - app_env: 'codeception' - - group: admin02 - app_env: 'codeception' - - group: admin03 - app_env: 'codeception' - - group: front - app_env: 'codeception' - - group: installer - app_env: 'install' - services: - postgres: - image: postgres:11 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: password - ports: - - 5432:5432 - # needed because the postgres container does not provide a healthcheck - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - - mailcatcher: - image: schickling/mailcatcher - ports: - - 1080:1080 - - 1025:1025 - - steps: - - name: Checkout - uses: actions/checkout@master - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Setup PHP - uses: nanasess/setup-php@master - with: - php-version: ${{ matrix.php }} - - - name: composer install - run: composer install --dev --no-interaction -o --apcu-autoloader - - name: Setup to EC-CUBE - env: - APP_ENV: ${{ matrix.app_env }} - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - run: | - echo "APP_ENV=${APP_ENV}" > .env - bin/console doctrine:database:create --env=dev - bin/console doctrine:schema:create --env=dev - bin/console eccube:fixtures:load --env=dev - - - name: setup-chromedriver - uses: nanasess/setup-chromedriver@master - - - name: Run chromedriver - run: | - export DISPLAY=:99 - chromedriver --url-base=/wd/hub & - echo ">>> Started chrome-driver" - sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & - echo ">>> Started xvfb" - - - name: Run package-api - run: | - if [[ ! -d ${PWD}/repos ]]; then mkdir -p ${PWD}/repos ; fi - docker run -d --rm -v ${PWD}/repos:/repos -e MOCK_REPO_DIR=/repos -p 8080:8080 eccube/mock-package-api:composer2 - cp codeception/_data/plugins/*-1.0.0.tgz repos - - - name: Start PHP Development Server - env: - APP_ENV: 'codeception' - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - MAILER_URL: 'smtp://127.0.0.1:1025' - ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' - run: php -S 127.0.0.1:8000 & - - - name: Codeception - env: - APP_ENV: ${{ matrix.app_env }} - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - MAILER_URL: 'smtp://127.0.0.1:1025' - ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' - GROUP: ${{ matrix.group }} - SYMFONY_DEPRECATIONS_HELPER: weak - run: vendor/bin/codecept -vvv run acceptance --env chrome,github_action -g ${GROUP} --html report.html - - name: Upload evidence - if: failure() - uses: actions/upload-artifact@v2 - with: - name: codeception-${{ matrix.group }}-evidence - path: codeception/_output/ - - name: Upload logs - if: failure() - uses: actions/upload-artifact@v2 - with: - name: codeception-${{ matrix.group }}-logs - path: var/log/ diff --git a/.github/workflows/penetration-test.yml b/.github/workflows/penetration-test.yml index 83fe71541b1..cb2850c8856 100644 --- a/.github/workflows/penetration-test.yml +++ b/.github/workflows/penetration-test.yml @@ -1,7 +1,13 @@ name: Penetration testing for EC-CUBE on: - schedule: - - cron: '0 15 * * 1' + push: + branches: + - '*' + tags: + - '*' + paths: + - '**' + - '!*.md' jobs: PenetrationTest: @@ -19,6 +25,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Checkout vlunerability + run: | + git remote add upstream https://github.com/EC-CUBE/ec-cube + git fetch --tags upstream + git checkout refs/tags/4.0.5 src/Eccube/Resource/template/admin/Order/mail_confirm.twig + git checkout refs/tags/4.0.5 src/Eccube/Resource/template/default/Mail/ - name: Setup to EC-CUBE run: | diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml deleted file mode 100644 index 72f3b87fc5d..00000000000 --- a/.github/workflows/phpstan.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: PHPStan -on: - push: - branches: - - '*' - tags: - - '*' - paths: - - '**' - - '!*.md' - pull_request: - paths: - - '**' - - '!*.md' - -jobs: - phpstan: - name: PHPStan - - runs-on: ubuntu-latest - - steps: - - name: "Checkout" - uses: actions/checkout@v2 - - name: Setup PHP - uses: nanasess/setup-php@master - with: - php-version: '7.4' - - name: composer install - run: composer install --dev --no-interaction -o --apcu-autoloader - - name: PHPStan - run: vendor/bin/phpstan analyze src/ --error-format=github diff --git a/.github/workflows/plugin-test.yml b/.github/workflows/plugin-test.yml deleted file mode 100644 index c9384812a4c..00000000000 --- a/.github/workflows/plugin-test.yml +++ /dev/null @@ -1,587 +0,0 @@ -name: Plugin test for EC-CUBE -on: - push: - branches: - - '*' - tags: - - '*' - paths: - - '**' - - '!*.md' - pull_request: - paths: - - '**' - - '!*.md' -jobs: - plugin-install: - name: Plugin install - runs-on: ${{ matrix.operating-system }} - strategy: - fail-fast: false - matrix: - operating-system: [ ubuntu-18.04 ] - php: [ 7.3 ] - db: [ pgsql, mysql ] - method: - - test_install_enable_disable_remove_store - - test_install_enable_disable_remove_local - - test_install_enable_disable_enable_disable_remove_store - - test_install_enable_disable_enable_disable_remove_local - - test_install_remove_local - - test_install_remove_store - - test_bundle_install_enable_disable_remove_store - - test_bundle_install_update_enable_disable_remove_store - include: - - db: pgsql - database_url: postgres://postgres:password@127.0.0.1:5432/eccube_db - database_server_version: 11 - - db: mysql - database_url: mysql://root:password@127.0.0.1:3306/eccube_db - database_server_version: 5 - - services: - mysql: - image: mysql:5.7 - env: - MYSQL_ROOT_PASSWORD: password - ports: - - 3306:3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - postgres: - image: postgres:11 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: password - ports: - - 5432:5432 - # needed because the postgres container does not provide a healthcheck - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - mailcatcher: - image: schickling/mailcatcher - ports: - - 1080:1080 - - 1025:1025 - - steps: - - name: Checkout - uses: actions/checkout@master - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Setup PHP - uses: nanasess/setup-php@master - with: - php-version: ${{ matrix.php }} - - - name: composer install - run: composer install --dev --no-interaction -o --apcu-autoloader - - - name: Setup to EC-CUBE - env: - APP_ENV: 'codeception' - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - run: | - echo "APP_ENV=${APP_ENV}" > .env - bin/console doctrine:database:create --env=dev - bin/console doctrine:schema:create --env=dev - bin/console eccube:fixtures:load --env=dev - - - name: Update baseinfo with pgsql - if: matrix.db == 'pgsql' - env: - PGPASSWORD: 'password' - run: | - sudo apt-fast install -y postgresql-client - psql eccube_db -h 127.0.0.1 -U postgres -c "update dtb_base_info set authentication_key='test';" - - - name: Update baseinfo with mysql - if: matrix.db == 'mysql' - run: mysql -h 127.0.0.1 -u root -ppassword eccube_db -e "update dtb_base_info set authentication_key='test';" - - - name: setup-chromedriver - uses: nanasess/setup-chromedriver@master - - - name: Run chromedriver - run: | - export DISPLAY=:99 - chromedriver --url-base=/wd/hub & - echo ">>> Started chrome-driver" - sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & - echo ">>> Started xvfb" - - - name: Start PHP Development Server - env: - APP_ENV: 'codeception' - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - MAILER_URL: 'smtp://127.0.0.1:1025' - ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' - run: php -S 127.0.0.1:8000 & - - ## ${PWD}/repos does not exist so service cannot be started - - name: Run package-api - run: | - if [[ ! -d ${PWD}/repos ]]; then mkdir -p ${PWD}/repos ; fi - docker run -d --rm -v ${PWD}/repos:/repos -e MOCK_REPO_DIR=/repos -p 8080:8080 eccube/mock-package-api:composer2 - - - name: Codeception - env: - APP_ENV: ${{ matrix.app_env }} - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - MAILER_URL: 'smtp://127.0.0.1:1025' - METHOD: ${{ matrix.method }} - ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' - NO_FIXTURES: 1 - run: vendor/bin/codecept -vvv run acceptance --env chrome,github_action EA10PluginCest:${METHOD} - - name: Upload evidence - if: failure() - uses: actions/upload-artifact@v2 - with: - name: plugin-install-${{ matrix.method }}-evidence - path: codeception/_output/ - - name: Upload logs - if: failure() - uses: actions/upload-artifact@v2 - with: - name: plugin-install-${{ matrix.method }}-logs - path: var/log/ - - plugin-update: - name: Plugin Update - runs-on: ${{ matrix.operating-system }} - strategy: - fail-fast: false - matrix: - operating-system: [ ubuntu-18.04 ] - php: [ 7.3 ] - db: [ pgsql, mysql ] - method: - - test_install_update_remove_store - - test_install_update_remove_local - - test_install_enable_disable_update_enable_disable_remove_local - - test_install_enable_disable_update_enable_disable_remove_store - - test_install_enable_update_disable_remove_store - - test_install_enable_update_disable_remove_local - include: - - db: pgsql - database_url: postgres://postgres:password@127.0.0.1:5432/eccube_db - database_server_version: 11 - - db: mysql - database_url: mysql://root:password@127.0.0.1:3306/eccube_db - database_server_version: 5 - - services: - mysql: - image: mysql:5.7 - env: - MYSQL_ROOT_PASSWORD: password - ports: - - 3306:3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - postgres: - image: postgres:11 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: password - ports: - - 5432:5432 - # needed because the postgres container does not provide a healthcheck - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - mailcatcher: - image: schickling/mailcatcher - ports: - - 1080:1080 - - 1025:1025 - - steps: - - name: Checkout - uses: actions/checkout@master - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Setup PHP - uses: nanasess/setup-php@master - with: - php-version: ${{ matrix.php }} - - - name: Install to Composer - run: composer install --dev --no-interaction -o --apcu-autoloader - - - name: Setup to EC-CUBE - env: - APP_ENV: 'codeception' - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - run: | - echo "APP_ENV=${APP_ENV}" > .env - bin/console doctrine:database:create --env=dev - bin/console doctrine:schema:create --env=dev - bin/console eccube:fixtures:load --env=dev - - - name: Update baseinfo with pgsql - if: matrix.db == 'pgsql' - env: - PGPASSWORD: 'password' - run: | - sudo apt-fast install -y postgresql-client - psql eccube_db -h 127.0.0.1 -U postgres -c "update dtb_base_info set authentication_key='test';" - - - name: Update baseinfo with mysql - if: matrix.db == 'mysql' - run: mysql -h 127.0.0.1 -u root -ppassword eccube_db -e "update dtb_base_info set authentication_key='test';" - - - name: setup-chromedriver - uses: nanasess/setup-chromedriver@master - - - name: Run chromedriver - run: | - export DISPLAY=:99 - chromedriver --url-base=/wd/hub & - echo ">>> Started chrome-driver" - sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & - echo ">>> Started xvfb" - - - name: Start PHP Development Server - env: - APP_ENV: 'codeception' - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - MAILER_URL: 'smtp://127.0.0.1:1025' - ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' - run: php -S 127.0.0.1:8000 & - - ## ${PWD}/repos does not exist so service cannot be started - - name: Run package-api - run: | - if [[ ! -d ${PWD}/repos ]]; then mkdir -p ${PWD}/repos ; fi - docker run -d --rm -v ${PWD}/repos:/repos -e MOCK_REPO_DIR=/repos -p 8080:8080 eccube/mock-package-api:composer2 - - - name: Run to Codeception - env: - APP_ENV: ${{ matrix.app_env }} - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - MAILER_URL: 'smtp://127.0.0.1:1025' - METHOD: ${{ matrix.method }} - ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' - NO_FIXTURES: 1 - run: vendor/bin/codecept -vvv run acceptance --env chrome,github_action EA10PluginCest:${METHOD} - - name: Upload evidence - if: failure() - uses: actions/upload-artifact@v2 - with: - name: plugin-update-${{ matrix.method }}-evidence - path: codeception/_output/ - - name: Upload logs - if: failure() - uses: actions/upload-artifact@v2 - with: - name: plugin-update-${{ matrix.method }}-logs - path: var/log/ - - plugin-extend: - name: Plugin extend - runs-on: ${{ matrix.operating-system }} - strategy: - fail-fast: false - matrix: - operating-system: [ ubuntu-18.04 ] - php: [ 7.3 ] - db: [ pgsql, mysql ] - method: - - test_extend_same_table_store - - test_extend_same_table_disabled_remove_store - - test_extend_same_table_local - - test_extend_same_table_disabled_remove_local - - test_extend_same_table_crossed_store - - test_extend_same_table_crossed_local - include: - - db: pgsql - database_url: postgres://postgres:password@127.0.0.1:5432/eccube_db - database_server_version: 11 - - db: mysql - database_url: mysql://root:password@127.0.0.1:3306/eccube_db - database_server_version: 5 - - services: - mysql: - image: mysql:5.7 - env: - MYSQL_ROOT_PASSWORD: password - ports: - - 3306:3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - postgres: - image: postgres:11 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: password - ports: - - 5432:5432 - # needed because the postgres container does not provide a healthcheck - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - mailcatcher: - image: schickling/mailcatcher - ports: - - 1080:1080 - - 1025:1025 - - steps: - - name: Checkout - uses: actions/checkout@master - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Setup PHP - uses: nanasess/setup-php@master - with: - php-version: ${{ matrix.php }} - - - name: Install to Composer - run: composer install --dev --no-interaction -o --apcu-autoloader - - - name: Setup to EC-CUBE - env: - APP_ENV: 'codeception' - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - run: | - echo "APP_ENV=${APP_ENV}" > .env - bin/console doctrine:database:create --env=dev - bin/console doctrine:schema:create --env=dev - bin/console eccube:fixtures:load --env=dev - - - name: Update baseinfo with pgsql - if: matrix.db == 'pgsql' - env: - PGPASSWORD: 'password' - run: | - sudo apt-fast install -y postgresql-client - psql eccube_db -h 127.0.0.1 -U postgres -c "update dtb_base_info set authentication_key='test';" - - - name: Update baseinfo with mysql - if: matrix.db == 'mysql' - run: mysql -h 127.0.0.1 -u root -ppassword eccube_db -e "update dtb_base_info set authentication_key='test';" - - - name: setup-chromedriver - uses: nanasess/setup-chromedriver@master - - - name: Run chromedriver - run: | - export DISPLAY=:99 - chromedriver --url-base=/wd/hub & - echo ">>> Started chrome-driver" - sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & - echo ">>> Started xvfb" - - - name: Start PHP Development Server - env: - APP_ENV: 'codeception' - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - MAILER_URL: 'smtp://127.0.0.1:1025' - ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' - run: php -S 127.0.0.1:8000 & - - ## ${PWD}/repos does not exist so service cannot be started - - name: Run package-api - run: | - if [[ ! -d ${PWD}/repos ]]; then mkdir -p ${PWD}/repos ; fi - docker run -d --rm -v ${PWD}/repos:/repos -e MOCK_REPO_DIR=/repos -p 8080:8080 eccube/mock-package-api:composer2 - - - name: Run to Codeception - env: - APP_ENV: ${{ matrix.app_env }} - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - MAILER_URL: 'smtp://127.0.0.1:1025' - METHOD: ${{ matrix.method }} - ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' - NO_FIXTURES: 1 - run: vendor/bin/codecept -vvv run acceptance --env chrome,github_action EA10PluginCest:${METHOD} - - name: Upload evidence - if: failure() - uses: actions/upload-artifact@v2 - with: - name: plugin-extend-${{ matrix.method }}-evidence - path: codeception/_output/ - - name: Upload logs - if: failure() - uses: actions/upload-artifact@v2 - with: - name: plugin-extend-${{ matrix.method }}-logs - path: var/log/ - - plugin-depend: - name: Plugin depend - runs-on: ${{ matrix.operating-system }} - strategy: - fail-fast: false - matrix: - operating-system: [ ubuntu-18.04 ] - php: [ 7.3 ] - db: [ pgsql, mysql ] - method: - - test_dependency_each_install_plugin - - test_dependency_plugin_install - - test_dependency_plugin_update - - test_install_error - - install_enable_disable_enable_disable_remove_store - - test_enhance_plugin_entity - include: - - db: pgsql - database_url: postgres://postgres:password@127.0.0.1:5432/eccube_db - database_server_version: 11 - - db: mysql - database_url: mysql://root:password@127.0.0.1:3306/eccube_db - database_server_version: 5 - exclude: - - db: mysql - method: test_dependency_plugin_update - - services: - mysql: - image: mysql:5.7 - env: - MYSQL_ROOT_PASSWORD: password - ports: - - 3306:3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - postgres: - image: postgres:11 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: password - ports: - - 5432:5432 - # needed because the postgres container does not provide a healthcheck - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - mailcatcher: - image: schickling/mailcatcher - ports: - - 1080:1080 - - 1025:1025 - - steps: - - name: Checkout - uses: actions/checkout@master - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Setup PHP - uses: nanasess/setup-php@master - with: - php-version: ${{ matrix.php }} - - - name: Install to Composer - run: composer install --dev --no-interaction -o --apcu-autoloader - - - name: Setup to EC-CUBE - env: - APP_ENV: 'codeception' - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - run: | - echo "APP_ENV=${APP_ENV}" > .env - bin/console doctrine:database:create --env=dev - bin/console doctrine:schema:create --env=dev - bin/console eccube:fixtures:load --env=dev - - - name: Update baseinfo with pgsql - if: matrix.db == 'pgsql' - env: - PGPASSWORD: 'password' - run: | - sudo apt-fast install -y postgresql-client - psql eccube_db -h 127.0.0.1 -U postgres -c "update dtb_base_info set authentication_key='test';" - - - name: Update baseinfo with mysql - if: matrix.db == 'mysql' - run: mysql -h 127.0.0.1 -u root -ppassword eccube_db -e "update dtb_base_info set authentication_key='test';" - - - name: setup-chromedriver - uses: nanasess/setup-chromedriver@master - - - name: Run chromedriver - run: | - export DISPLAY=:99 - chromedriver --url-base=/wd/hub & - echo ">>> Started chrome-driver" - sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & - echo ">>> Started xvfb" - - - name: Start PHP Development Server - env: - APP_ENV: 'codeception' - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - MAILER_URL: 'smtp://127.0.0.1:1025' - ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' - run: php -S 127.0.0.1:8000 & - - ## ${PWD}/repos does not exist so service cannot be started - - name: Run package-api - run: | - if [[ ! -d ${PWD}/repos ]]; then mkdir -p ${PWD}/repos ; fi - docker run -d --rm -v ${PWD}/repos:/repos -e MOCK_REPO_DIR=/repos -p 8080:8080 eccube/mock-package-api:composer2 - - - name: Run to Codeception - env: - APP_ENV: ${{ matrix.app_env }} - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - MAILER_URL: 'smtp://127.0.0.1:1025' - METHOD: ${{ matrix.method }} - ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' - NO_FIXTURES: 1 - run: vendor/bin/codecept -vvv run acceptance --env chrome,github_action EA10PluginCest:${METHOD} - - name: Upload evidence - if: failure() - uses: actions/upload-artifact@v2 - with: - name: plugin-depend-${{ matrix.method }}-evidence - path: codeception/_output/ - - name: Upload logs - if: failure() - uses: actions/upload-artifact@v2 - with: - name: plugin-depend-${{ matrix.method }}-logs - path: var/log/ diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml deleted file mode 100644 index 7c0b5406247..00000000000 --- a/.github/workflows/unit-test.yml +++ /dev/null @@ -1,103 +0,0 @@ -name: Unit test for EC-CUBE -on: - push: - branches: - - '*' - tags: - - '*' - paths: - - '**' - - '!*.md' - pull_request: - paths: - - '**' - - '!*.md' -jobs: - phpunit: - name: PHPUnit - runs-on: ${{ matrix.operating-system }} - strategy: - fail-fast: false - matrix: - operating-system: [ ubuntu-18.04 ] - php: [ 7.1, 7.2, 7.3, 7.4 ] - db: [ mysql, pgsql, sqlite3 ] - include: - - db: mysql - database_url: mysql://root:password@127.0.0.1:3306/eccube_db - database_server_version: 5 - - db: pgsql - database_url: postgres://postgres:password@127.0.0.1:5432/eccube_db - database_server_version: 11 - - db: sqlite3 - database_url: sqlite:///var/eccube.db - database_server_version: 3 - - services: - mysql: - image: mysql:5.7 - env: - MYSQL_ROOT_PASSWORD: password - ports: - - 3306:3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - postgres: - image: postgres:11 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: password - ports: - - 5432:5432 - # needed because the postgres container does not provide a healthcheck - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - - steps: - - name: Checkout - uses: actions/checkout@master - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Setup PHP - uses: nanasess/setup-php@master - with: - php-version: ${{ matrix.php }} - - - name: composer install - run: composer install --dev --no-interaction -o --apcu-autoloader - - - name: Setup EC-CUBE - env: - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - run: | - bin/console doctrine:database:create - bin/console doctrine:schema:create - bin/console eccube:fixtures:load - - - name: PHPUnit - env: - APP_ENV: 'test' - DATABASE_URL: ${{ matrix.database_url }} - DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} - MAILER_URL: 'smtp://127.0.0.11025' - run: | - bin/phpunit --exclude-group cache-clear,cache-clear-install,update-schema-doctrine - bin/phpunit --group cache-clear - bin/phpunit --group cache-clear-install - bin/phpunit --group update-schema-doctrine --exclude-group update-schema-doctrine-install - bin/phpunit --group update-schema-doctrine-install --filter=testInstallPluginWithNoProxy - bin/phpunit --group update-schema-doctrine-install --filter=testInstallPluginWithProxy - bin/phpunit --group update-schema-doctrine-install --filter=testEnablePluginWithNoProxy - bin/phpunit --group update-schema-doctrine-install --filter=testEnablePluginWithProxy - bin/phpunit --group update-schema-doctrine-install --filter=testDisablePluginWithNoProxy - bin/phpunit --group update-schema-doctrine-install --filter=testDisablePluginWithProxy - bin/phpunit --group update-schema-doctrine-install --filter=testCreateEntityAndTrait diff --git a/.github/workflows/vaddy-1.yml b/.github/workflows/vaddy-1.yml deleted file mode 100644 index 4e532feaaf1..00000000000 --- a/.github/workflows/vaddy-1.yml +++ /dev/null @@ -1,507 +0,0 @@ -name: VAddy -on: - schedule: - - cron: '0 15 * * 0' - -jobs: - vaddy: - name: VAddy - runs-on: ubuntu-18.04 - strategy: - matrix: - include: - - vaddy_project: 'ADMIN01' - command1: 'EA03ProductCest' - command2: 'EA05CustomerCest' - command3: 'EA08SysteminfoCest' - command4: 'EA09ShippingCest' - - vaddy_project: 'ADMIN02' - command1: 'EA04OrderCest' - - vaddy_project: 'FRONT' - command1: '-x admin -x plugin' - services: - postgres: - image: postgres:11 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: password - ports: - - 5432:5432 - # needed because the postgres container does not provide a healthcheck - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - mailcatcher: - image: schickling/mailcatcher - ports: - - 1080:1080 - - 1025:1025 - steps: - - name: Checkout - uses: actions/checkout@master - - - name: Setup PHP - uses: nanasess/setup-php@master - with: - php-version: '7.3' - - - name: setup-chromedriver - uses: nanasess/setup-chromedriver@master - - - name: "VAddy: install" - working-directory: /tmp - run: | - wget -q https://github.com/vaddy/go-vaddy/archive/master.zip - unzip master.zip - echo 'export VADDY_AUTH_KEY="${{ secrets.VADDY_AUTH_KEY }}" - export VADDY_FQDN="${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}" - export VADDY_VERIFICATION_CODE="${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" - export VADDY_USER="${{ secrets.VADDY_USER }}" - export VADDY_YOUR_LOCAL_IP="127.0.0.1" - export VADDY_YOUR_LOCAL_PORT="8080" - export VADDY_HTTPS_PROXY=""' > go-vaddy-master/privatenet/conf/vaddy.conf - mkdir -p ${HOME}/.ssh - echo 'Host *.vaddy.net - StrictHostKeyChecking no' >> ${HOME}/.ssh/config - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: "EC-CUBE: setup" - env: - DATABASE_URL: postgres://postgres:password@127.0.0.1:5432/eccube_db - DATABASE_SERVER_VERSION: 11 - run: | - composer install --no-scripts --no-dev --no-interaction --optimize-autoloader - php bin/template_jp.php - rm -rf app/Plugin/* - echo 'getEntityManager()->detach($event->getEntity()); - } - }' > CancelDeletionEventSubscriber.php - sed -i.bak -e 's_$fs->remove_// $fs->remove_' src/Eccube/Controller/Admin/Content/PageController.php - rm -f app/config/eccube/packages/dev/web_profiler.yaml - bin/console doctrine:database:create --env=dev - bin/console doctrine:schema:create --env=dev - bin/console eccube:fixtures:load --env=dev - chmod -R 777 html - - - name: Install Plugins - env: - APP_ENV: 'prod' - DATABASE_URL: postgres://postgres:password@127.0.0.1:5432/eccube_db - DATABASE_SERVER_VERSION: 11 - run: | - bin/console eccube:composer:require "ec-cube/recommend4" - bin/console eccube:composer:require "ec-cube/coupon4" - bin/console eccube:composer:require "ec-cube/mailmagazine4" - bin/console eccube:composer:require "ec-cube/salesreport4" - bin/console eccube:composer:require "ec-cube/relatedproduct4" - bin/console eccube:composer:require "ec-cube/securitychecker4" - bin/console eccube:composer:require "ec-cube/productreview4" - bin/console eccube:composer:require "ec-cube/api" - bin/console eccube:composer:require "ec-cube/sitekit" - bin/console eccube:composer:require "ec-cube/gmc" - - - name: Pre Install Plugins - env: - DATABASE_URL: postgres://postgres:password@127.0.0.1:5432/eccube_db - DATABASE_SERVER_VERSION: 11 - PGPASSWORD: 'password' - run: | - psql eccube_db -h 127.0.0.1 -U postgres -c "select id,name,code,0 as enabled,version,source,0 as initialized,'2021-08-13 00:00:00' as create_date,'2021-08-13 00:00:00' as update_date,discriminator_type from dtb_plugin;" -A -F, --pset footer > src/Eccube/Resource/doctrine/import_csv/ja/dtb_plugin.csv - for code in Api Coupon4 GMC MailMagazine4 ProductReview4 Recommend4 RelatedProduct4 SalesReport4 Securitychecker4 SiteKit; do bin/console eccube:plugin:enable --code $code; done - - - name: "EC-CUBE: package" - working-directory: ../ - run: ${{ github.event.repository.name }}/package.sh - - - name: "EC-CUBE: build" - run: docker build -t ec-cube --build-arg SKIP_INSTALL_SCRIPT_ON_DOCKER_BUILD=true . - - name: "Codeception: prepare" - run: | - echo "APP_ENV=codeception" > .env - export DISPLAY=:99 - chromedriver --url-base=/wd/hub & - echo ">>> Started chrome-driver" - sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & - echo ">>> Started xvfb" - composer install --no-scripts --no-interaction --optimize-autoloader - sudo echo "127.0.0.1 ${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}" | sudo tee -a /etc/hosts - echo "modules: - config: - WebDriver: - host: '127.0.0.1' - port: 9515 - url: "http://${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}:8080" - browser: chrome - capabilities: - chromeOptions: - args: ["--headless", "--disable-gpu"] - prefs: - download.default_directory: '%PWD%/codeception/_support/_downloads' - MailCatcher: - url: 'mail' - port: 1080" > codeception/_envs/local.yml - - - name: "Scan 1" - run: echo 'Scan 1' - - - name: "EC-CUBE: run" - run: | - docker run \ - -e APP_ENV=dev \ - -e APP_DEBUG=1 \ - -e DATABASE_URL="postgres://postgres:password@172.17.0.1:5432/eccube_db" \ - -e DATABASE_SERVER_VERSION=11 \ - -e MAILER_URL="smtp://172.17.0.1:1025" \ - -v ${PWD}/html:/tmp/html \ - --rm -d -p 8080:80 --name eccube ec-cube - docker cp ../eccube.tar.gz eccube:/tmp/ - docker exec -w /tmp eccube bash -c "rm -rf /var/www/html; tar xf /tmp/eccube.tar.gz -C /var/www; mv /var/www/ec-cube /var/www/html; chown -R www-data: /var/www/html" - docker exec eccube bash -c "rm -rf /var/www/html/html; ln -s /tmp/html /var/www/html/html;" - docker exec -u www-data eccube bin/console eccube:install -n - docker exec -u www-data -e VADDY_VERIFICATION_CODE=${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }} eccube bash -c 'echo ${VADDY_VERIFICATION_CODE} > vaddy-${VADDY_VERIFICATION_CODE}.html' - docker exec -u www-data eccube bash -c 'for code in Api Coupon4 GMC MailMagazine4 ProductReview4 Recommend4 RelatedProduct4 SalesReport4 Securitychecker4 SiteKit; do bin/console eccube:plugin:enable --code $code; done' - - - name: "VAddy: connect" - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh connect - - - name: "VAddy: crawl" - env: - APP_ENV: "codeception" - DATABASE_URL: "postgres://postgres:password@127.0.0.1:5432/eccube_db" - DATABASE_SERVER_VERSION: "11" - MAILER_URL: "smtp://127.0.0.1:1025" - BASE_URL: "http://${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}:8080" - VADDY_PROXY: "${{ secrets.VADDY_PROXY }}" - VADDY_PROXY_PORT: "${{ secrets.VADDY_PROXY_PORT }}" - VADDY_VERIFICATION_CODE: "${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" - VADDY_CRAWL: "${{ matrix.command1 }}" - run: | - vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:begin - vendor/bin/codecept -vvv run -g vaddy acceptance --env chrome,local,vaddy --html report.html ${{ matrix.command1 }} || true - vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:commit - - - name: Upload report - uses: actions/upload-artifact@v2 - with: - name: crawl-reports - path: codeception/_output/**/* - - - name: "VAddy: disconnect" - if: ${{ always() }} - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh disconnect - - - name: "VAddy: scan" - continue-on-error: true - env: - VADDY_CRAWL: "${{ matrix.command1 }}" - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh scan - - - name: "EC-CUBE: stop" - if: ${{ always() }} - continue-on-error: true - run: docker rm -f -v eccube - - - name: "Scan 2" - if: ${{ matrix.command2 != '' }} - run: echo 'Scan 2' - - - name: "EC-CUBE: run" - if: ${{ matrix.command2 != '' }} - run: | - docker run \ - -e APP_ENV=dev \ - -e APP_DEBUG=1 \ - -e DATABASE_URL="postgres://postgres:password@172.17.0.1:5432/eccube_db" \ - -e DATABASE_SERVER_VERSION=11 \ - -e MAILER_URL="smtp://172.17.0.1:1025" \ - -v ${PWD}/html:/tmp/html \ - --rm -d -p 8080:80 --name eccube ec-cube - docker cp ../eccube.tar.gz eccube:/tmp/ - docker exec -w /tmp eccube bash -c "rm -rf /var/www/html; tar xf /tmp/eccube.tar.gz -C /var/www; mv /var/www/ec-cube /var/www/html; chown -R www-data: /var/www/html" - docker exec eccube bash -c "rm -rf /var/www/html/html; ln -s /tmp/html /var/www/html/html;" - docker exec -u www-data eccube bin/console eccube:install -n - docker exec -u www-data -e VADDY_VERIFICATION_CODE=${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }} eccube bash -c 'echo ${VADDY_VERIFICATION_CODE} > vaddy-${VADDY_VERIFICATION_CODE}.html' - docker exec -u www-data eccube bash -c 'for code in Api Coupon4 GMC MailMagazine4 ProductReview4 Recommend4 RelatedProduct4 SalesReport4 Securitychecker4 SiteKit; do bin/console eccube:plugin:enable --code $code; done' - - - name: "VAddy: connect" - if: ${{ matrix.command2 != '' }} - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh connect - - - name: "VAddy: crawl" - if: ${{ matrix.command2 != '' && success() }} - env: - APP_ENV: "codeception" - DATABASE_URL: "postgres://postgres:password@127.0.0.1:5432/eccube_db" - DATABASE_SERVER_VERSION: "11" - MAILER_URL: "smtp://127.0.0.1:1025" - BASE_URL: "http://${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}:8080" - VADDY_PROXY: "${{ secrets.VADDY_PROXY }}" - VADDY_PROXY_PORT: "${{ secrets.VADDY_PROXY_PORT }}" - VADDY_VERIFICATION_CODE: "${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" - VADDY_CRAWL: "${{ matrix.command2 }}" - run: | - vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:begin - vendor/bin/codecept -vvv run -g vaddy acceptance --env chrome,local,vaddy --html report.html ${{ matrix.command2 }} || true - vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:commit - - - name: Upload report - if: ${{ matrix.command2 != '' && success() }} - uses: actions/upload-artifact@v2 - with: - name: crawl-reports - path: codeception/_output/**/* - - - name: "VAddy: disconnect" - if: ${{ matrix.command2 }} - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh disconnect - - - name: "VAddy: scan" - if: ${{ matrix.command2 != '' && success() }} - continue-on-error: true - env: - VADDY_CRAWL: "${{ matrix.command2 }}" - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh scan - - - name: "EC-CUBE: stop" - if: ${{ matrix.command2 }} - continue-on-error: true - run: docker rm -f -v eccube - - - name: "Scan 3" - if: ${{ matrix.command3 != '' }} - run: echo 'Scan 3' - - - name: "EC-CUBE: run" - if: ${{ matrix.command3 != '' }} - run: | - docker run \ - -e APP_ENV=dev \ - -e APP_DEBUG=1 \ - -e DATABASE_URL="postgres://postgres:password@172.17.0.1:5432/eccube_db" \ - -e DATABASE_SERVER_VERSION=11 \ - -e MAILER_URL="smtp://172.17.0.1:1025" \ - -v ${PWD}/html:/tmp/html \ - --rm -d -p 8080:80 --name eccube ec-cube - docker cp ../eccube.tar.gz eccube:/tmp/ - docker exec -w /tmp eccube bash -c "rm -rf /var/www/html; tar xf /tmp/eccube.tar.gz -C /var/www; mv /var/www/ec-cube /var/www/html; chown -R www-data: /var/www/html" - docker exec eccube bash -c "rm -rf /var/www/html/html; ln -s /tmp/html /var/www/html/html;" - docker exec -u www-data eccube bin/console eccube:install -n - docker exec -u www-data -e VADDY_VERIFICATION_CODE=${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }} eccube bash -c 'echo ${VADDY_VERIFICATION_CODE} > vaddy-${VADDY_VERIFICATION_CODE}.html' - docker exec -u www-data eccube bash -c 'for code in Api Coupon4 GMC MailMagazine4 ProductReview4 Recommend4 RelatedProduct4 SalesReport4 Securitychecker4 SiteKit; do bin/console eccube:plugin:enable --code $code; done' - - - name: "VAddy: connect" - if: ${{ matrix.command3 != '' }} - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh connect - - - name: "VAddy: crawl" - if: ${{ matrix.command3 != '' && success() }} - env: - APP_ENV: "codeception" - DATABASE_URL: "postgres://postgres:password@127.0.0.1:5432/eccube_db" - DATABASE_SERVER_VERSION: "11" - MAILER_URL: "smtp://127.0.0.1:1025" - BASE_URL: "http://${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}:8080" - VADDY_PROXY: "${{ secrets.VADDY_PROXY }}" - VADDY_PROXY_PORT: "${{ secrets.VADDY_PROXY_PORT }}" - VADDY_VERIFICATION_CODE: "${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" - VADDY_CRAWL: "${{ matrix.command3 }}" - run: | - vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:begin - vendor/bin/codecept -vvv run -g vaddy acceptance --env chrome,local,vaddy --html report.html ${{ matrix.command3 }} || true - vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:commit - - - name: Upload report - if: ${{ matrix.command3 != '' && success() }} - uses: actions/upload-artifact@v2 - with: - name: crawl-reports - path: codeception/_output/**/* - - - name: "VAddy: disconnect" - if: ${{ matrix.command3 }} - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh disconnect - - - name: "VAddy: scan" - if: ${{ matrix.command3 != '' && success() }} - continue-on-error: true - env: - VADDY_CRAWL: "${{ matrix.command3 }}" - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh scan - - - name: "EC-CUBE: stop" - if: ${{ matrix.command3 }} - continue-on-error: true - run: docker rm -f -v eccube - - - name: "Scan 4" - if: ${{ matrix.command4 != '' }} - run: echo 'Scan 4' - - - name: "EC-CUBE: run" - if: ${{ matrix.command4 != '' }} - run: | - docker run \ - -e APP_ENV=dev \ - -e APP_DEBUG=1 \ - -e DATABASE_URL="postgres://postgres:password@172.17.0.1:5432/eccube_db" \ - -e DATABASE_SERVER_VERSION=11 \ - -e MAILER_URL="smtp://172.17.0.1:1025" \ - -v ${PWD}/html:/tmp/html \ - --rm -d -p 8080:80 --name eccube ec-cube - docker cp ../eccube.tar.gz eccube:/tmp/ - docker exec -w /tmp eccube bash -c "rm -rf /var/www/html; tar xf /tmp/eccube.tar.gz -C /var/www; mv /var/www/ec-cube /var/www/html; chown -R www-data: /var/www/html" - docker exec eccube bash -c "rm -rf /var/www/html/html; ln -s /tmp/html /var/www/html/html;" - docker exec -u www-data eccube bin/console eccube:install -n - docker exec -u www-data -e VADDY_VERIFICATION_CODE=${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }} eccube bash -c 'echo ${VADDY_VERIFICATION_CODE} > vaddy-${VADDY_VERIFICATION_CODE}.html' - docker exec -u www-data eccube bash -c 'for code in Api Coupon4 GMC MailMagazine4 ProductReview4 Recommend4 RelatedProduct4 SalesReport4 Securitychecker4 SiteKit; do bin/console eccube:plugin:enable --code $code; done' - - - name: "VAddy: connect" - if: ${{ matrix.command4 != '' }} - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh connect - - - name: "VAddy: crawl" - if: ${{ matrix.command4 != '' && success() }} - env: - APP_ENV: "codeception" - DATABASE_URL: "postgres://postgres:password@127.0.0.1:5432/eccube_db" - DATABASE_SERVER_VERSION: "11" - MAILER_URL: "smtp://127.0.0.1:1025" - BASE_URL: "http://${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}:8080" - VADDY_PROXY: "${{ secrets.VADDY_PROXY }}" - VADDY_PROXY_PORT: "${{ secrets.VADDY_PROXY_PORT }}" - VADDY_VERIFICATION_CODE: "${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" - VADDY_CRAWL: "${{ matrix.command4 }}" - run: | - vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:begin - vendor/bin/codecept -vvv run -g vaddy acceptance --env chrome,local,vaddy --html report.html ${{ matrix.command4 }} || true - vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:commit - - - name: Upload report - if: ${{ matrix.command4 != '' && success() }} - uses: actions/upload-artifact@v2 - with: - name: crawl-reports - path: codeception/_output/**/* - - - name: "VAddy: disconnect" - if: ${{ matrix.command4 }} - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh disconnect - - - name: "VAddy: scan" - if: ${{ matrix.command4 != '' && success() }} - continue-on-error: true - env: - VADDY_CRAWL: "${{ matrix.command4 }}" - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh scan - - - name: "EC-CUBE: stop" - if: ${{ matrix.command4 }} - continue-on-error: true - run: docker rm -f -v eccube - - - name: "Scan 5" - if: ${{ matrix.command5 != '' }} - run: echo 'Scan 5' - - - name: "EC-CUBE: run" - if: ${{ matrix.command5 != '' }} - run: | - docker run \ - -e APP_ENV=dev \ - -e APP_DEBUG=1 \ - -e DATABASE_URL="postgres://postgres:password@172.17.0.1:5432/eccube_db" \ - -e DATABASE_SERVER_VERSION=11 \ - -e MAILER_URL="smtp://172.17.0.1:1025" \ - -v ${PWD}/html:/tmp/html \ - --rm -d -p 8080:80 --name eccube ec-cube - docker cp ../eccube.tar.gz eccube:/tmp/ - docker exec -w /tmp eccube bash -c "rm -rf /var/www/html; tar xf /tmp/eccube.tar.gz -C /var/www; mv /var/www/ec-cube /var/www/html; chown -R www-data: /var/www/html" - docker exec eccube bash -c "rm -rf /var/www/html/html; ln -s /tmp/html /var/www/html/html;" - docker exec -u www-data eccube bin/console eccube:install -n - docker exec -u www-data -e VADDY_VERIFICATION_CODE=${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }} eccube bash -c 'echo ${VADDY_VERIFICATION_CODE} > vaddy-${VADDY_VERIFICATION_CODE}.html' - docker exec -u www-data eccube bash -c 'for code in Api Coupon4 GMC MailMagazine4 ProductReview4 Recommend4 RelatedProduct4 SalesReport4 Securitychecker4 SiteKit; do bin/console eccube:plugin:enable --code $code; done' - - - name: "VAddy: connect" - if: ${{ matrix.command5 != '' }} - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh connect - - - name: "VAddy: crawl" - if: ${{ matrix.command5 != '' && success() }} - env: - APP_ENV: "codeception" - DATABASE_URL: "postgres://postgres:password@127.0.0.1:5432/eccube_db" - DATABASE_SERVER_VERSION: "11" - MAILER_URL: "smtp://127.0.0.1:1025" - BASE_URL: "http://${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}:8080" - VADDY_PROXY: "${{ secrets.VADDY_PROXY }}" - VADDY_PROXY_PORT: "${{ secrets.VADDY_PROXY_PORT }}" - VADDY_VERIFICATION_CODE: "${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" - VADDY_CRAWL: "${{ matrix.command5 }}" - run: | - vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:begin - vendor/bin/codecept -vvv run -g vaddy acceptance --env chrome,local,vaddy --html report.html ${{ matrix.command5 }} || true - vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:commit - - - name: Upload report - if: ${{ matrix.command5 != '' && success() }} - uses: actions/upload-artifact@v2 - with: - name: crawl-reports - path: codeception/_output/**/* - - - name: "VAddy: disconnect" - if: ${{ matrix.command5 }} - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh disconnect - - - name: "VAddy: scan" - if: ${{ matrix.command5 != '' && success() }} - continue-on-error: true - env: - VADDY_CRAWL: "${{ matrix.command5 }}" - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh scan - - - name: "EC-CUBE: stop" - if: ${{ matrix.command5 }} - continue-on-error: true - run: docker rm -f -v eccube - -# - name: VAddy private net logs -# if: ${{ always() }} -# working-directory: /tmp/go-vaddy-master/privatenet -# run: cat vaddy/*.txt diff --git a/.github/workflows/vaddy-2.yml b/.github/workflows/vaddy-2.yml deleted file mode 100644 index 1814949eb2d..00000000000 --- a/.github/workflows/vaddy-2.yml +++ /dev/null @@ -1,508 +0,0 @@ -name: VAddy -on: - schedule: - - cron: '0 21 * * 0' - -jobs: - vaddy: - name: VAddy - runs-on: ubuntu-18.04 - strategy: - matrix: - include: - - vaddy_project: 'ADMIN01' - command1: 'EA06ContentsManagementCest' - - vaddy_project: 'ADMIN02' - command1: ' -x delivery -x basicsetting -x taxrule -x mailsetting -x csvsetting -x orderstatus -x pluginauth EA07BasicinfoCest' - command2: '-x paymentmethod -x basicsetting -x taxrule -x mailsetting -x csvsetting -x orderstatus -x pluginauth EA07BasicinfoCest' - command3: '-x paymentmethod -x delivery -x mailsetting -x csvsetting -x orderstatus EA07BasicinfoCest' - command4: '-x paymentmethod -x delivery -x basicsetting -x taxrule -x orderstatus -x pluginauth EA07BasicinfoCest' - command5: '-x paymentmethod -x delivery -x basicsetting -x taxrule -x mailsetting -x csvsetting -x pluginauth EA07BasicinfoCest' - - vaddy_project: 'FRONT' - command1: '-x admin -x front' - services: - postgres: - image: postgres:11 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: password - ports: - - 5432:5432 - # needed because the postgres container does not provide a healthcheck - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - mailcatcher: - image: schickling/mailcatcher - ports: - - 1080:1080 - - 1025:1025 - steps: - - name: Checkout - uses: actions/checkout@master - - - name: Setup PHP - uses: nanasess/setup-php@master - with: - php-version: '7.3' - - - name: setup-chromedriver - uses: nanasess/setup-chromedriver@master - - - name: "VAddy: install" - working-directory: /tmp - run: | - wget -q https://github.com/vaddy/go-vaddy/archive/master.zip - unzip master.zip - echo 'export VADDY_AUTH_KEY="${{ secrets.VADDY_AUTH_KEY }}" - export VADDY_FQDN="${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}" - export VADDY_VERIFICATION_CODE="${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" - export VADDY_USER="${{ secrets.VADDY_USER }}" - export VADDY_YOUR_LOCAL_IP="127.0.0.1" - export VADDY_YOUR_LOCAL_PORT="8080" - export VADDY_HTTPS_PROXY=""' > go-vaddy-master/privatenet/conf/vaddy.conf - mkdir -p ${HOME}/.ssh - echo 'Host *.vaddy.net - StrictHostKeyChecking no' >> ${HOME}/.ssh/config - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: "EC-CUBE: setup" - env: - DATABASE_URL: postgres://postgres:password@127.0.0.1:5432/eccube_db - DATABASE_SERVER_VERSION: 11 - run: | - composer install --no-scripts --no-dev --no-interaction --optimize-autoloader - php bin/template_jp.php - rm -rf app/Plugin/* - echo 'getEntityManager()->detach($event->getEntity()); - } - }' > CancelDeletionEventSubscriber.php - sed -i.bak -e 's_$fs->remove_// $fs->remove_' src/Eccube/Controller/Admin/Content/PageController.php - rm -f app/config/eccube/packages/dev/web_profiler.yaml - bin/console doctrine:database:create --env=dev - bin/console doctrine:schema:create --env=dev - bin/console eccube:fixtures:load --env=dev - chmod -R 777 html - - - name: Install Plugins - env: - APP_ENV: 'prod' - DATABASE_URL: postgres://postgres:password@127.0.0.1:5432/eccube_db - DATABASE_SERVER_VERSION: 11 - run: | - bin/console eccube:composer:require "ec-cube/recommend4" - bin/console eccube:composer:require "ec-cube/coupon4" - bin/console eccube:composer:require "ec-cube/mailmagazine4" - bin/console eccube:composer:require "ec-cube/salesreport4" - bin/console eccube:composer:require "ec-cube/relatedproduct4" - bin/console eccube:composer:require "ec-cube/securitychecker4" - bin/console eccube:composer:require "ec-cube/productreview4" - bin/console eccube:composer:require "ec-cube/api" - bin/console eccube:composer:require "ec-cube/sitekit" - bin/console eccube:composer:require "ec-cube/gmc" - - - name: Pre Install Plugins - env: - DATABASE_URL: postgres://postgres:password@127.0.0.1:5432/eccube_db - DATABASE_SERVER_VERSION: 11 - PGPASSWORD: 'password' - run: | - psql eccube_db -h 127.0.0.1 -U postgres -c "select id,name,code,0 as enabled,version,source,0 as initialized,'2021-08-13 00:00:00' as create_date,'2021-08-13 00:00:00' as update_date,discriminator_type from dtb_plugin;" -A -F, --pset footer > src/Eccube/Resource/doctrine/import_csv/ja/dtb_plugin.csv - for code in Api Coupon4 GMC MailMagazine4 ProductReview4 Recommend4 RelatedProduct4 SalesReport4 Securitychecker4 SiteKit; do bin/console eccube:plugin:enable --code $code; done - - - name: "EC-CUBE: package" - working-directory: ../ - run: ${{ github.event.repository.name }}/package.sh - - - name: "EC-CUBE: build" - run: docker build -t ec-cube --build-arg SKIP_INSTALL_SCRIPT_ON_DOCKER_BUILD=true . - - name: "Codeception: prepare" - run: | - echo "APP_ENV=codeception" > .env - export DISPLAY=:99 - chromedriver --url-base=/wd/hub & - echo ">>> Started chrome-driver" - sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & - echo ">>> Started xvfb" - composer install --no-scripts --no-interaction --optimize-autoloader - sudo echo "127.0.0.1 ${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}" | sudo tee -a /etc/hosts - echo "modules: - config: - WebDriver: - host: '127.0.0.1' - port: 9515 - url: "http://${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}:8080" - browser: chrome - capabilities: - chromeOptions: - args: ["--headless", "--disable-gpu"] - prefs: - download.default_directory: '%PWD%/codeception/_support/_downloads' - MailCatcher: - url: 'mail' - port: 1080" > codeception/_envs/local.yml - - - name: "Scan 1" - run: echo 'Scan 1' - - - name: "EC-CUBE: run" - run: | - docker run \ - -e APP_ENV=dev \ - -e APP_DEBUG=1 \ - -e DATABASE_URL="postgres://postgres:password@172.17.0.1:5432/eccube_db" \ - -e DATABASE_SERVER_VERSION=11 \ - -e MAILER_URL="smtp://172.17.0.1:1025" \ - -v ${PWD}/html:/tmp/html \ - --rm -d -p 8080:80 --name eccube ec-cube - docker cp ../eccube.tar.gz eccube:/tmp/ - docker exec -w /tmp eccube bash -c "rm -rf /var/www/html; tar xf /tmp/eccube.tar.gz -C /var/www; mv /var/www/ec-cube /var/www/html; chown -R www-data: /var/www/html" - docker exec eccube bash -c "rm -rf /var/www/html/html; ln -s /tmp/html /var/www/html/html;" - docker exec -u www-data eccube bin/console eccube:install -n - docker exec -u www-data -e VADDY_VERIFICATION_CODE=${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }} eccube bash -c 'echo ${VADDY_VERIFICATION_CODE} > vaddy-${VADDY_VERIFICATION_CODE}.html' - docker exec -u www-data eccube bash -c 'for code in Api Coupon4 GMC MailMagazine4 ProductReview4 Recommend4 RelatedProduct4 SalesReport4 Securitychecker4 SiteKit; do bin/console eccube:plugin:enable --code $code; done' - - - name: "VAddy: connect" - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh connect - - - name: "VAddy: crawl" - env: - APP_ENV: "codeception" - DATABASE_URL: "postgres://postgres:password@127.0.0.1:5432/eccube_db" - DATABASE_SERVER_VERSION: "11" - MAILER_URL: "smtp://127.0.0.1:1025" - BASE_URL: "http://${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}:8080" - VADDY_PROXY: "${{ secrets.VADDY_PROXY }}" - VADDY_PROXY_PORT: "${{ secrets.VADDY_PROXY_PORT }}" - VADDY_VERIFICATION_CODE: "${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" - VADDY_CRAWL: "${{ matrix.command1 }}" - run: | - vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:begin - vendor/bin/codecept -vvv run -g vaddy acceptance --env chrome,local,vaddy --html report.html ${{ matrix.command1 }} || true - vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:commit - - - name: Upload report - uses: actions/upload-artifact@v2 - with: - name: crawl-reports - path: codeception/_output/**/* - - - name: "VAddy: disconnect" - if: ${{ always() }} - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh disconnect - - - name: "VAddy: scan" - continue-on-error: true - env: - VADDY_CRAWL: "${{ matrix.command1 }}" - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh scan - - - name: "EC-CUBE: stop" - if: ${{ always() }} - continue-on-error: true - run: docker rm -f -v eccube - - - name: "Scan 2" - if: ${{ matrix.command2 != '' }} - run: echo 'Scan 2' - - - name: "EC-CUBE: run" - if: ${{ matrix.command2 != '' }} - run: | - docker run \ - -e APP_ENV=dev \ - -e APP_DEBUG=1 \ - -e DATABASE_URL="postgres://postgres:password@172.17.0.1:5432/eccube_db" \ - -e DATABASE_SERVER_VERSION=11 \ - -e MAILER_URL="smtp://172.17.0.1:1025" \ - -v ${PWD}/html:/tmp/html \ - --rm -d -p 8080:80 --name eccube ec-cube - docker cp ../eccube.tar.gz eccube:/tmp/ - docker exec -w /tmp eccube bash -c "rm -rf /var/www/html; tar xf /tmp/eccube.tar.gz -C /var/www; mv /var/www/ec-cube /var/www/html; chown -R www-data: /var/www/html" - docker exec eccube bash -c "rm -rf /var/www/html/html; ln -s /tmp/html /var/www/html/html;" - docker exec -u www-data eccube bin/console eccube:install -n - docker exec -u www-data -e VADDY_VERIFICATION_CODE=${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }} eccube bash -c 'echo ${VADDY_VERIFICATION_CODE} > vaddy-${VADDY_VERIFICATION_CODE}.html' - docker exec -u www-data eccube bash -c 'for code in Api Coupon4 GMC MailMagazine4 ProductReview4 Recommend4 RelatedProduct4 SalesReport4 Securitychecker4 SiteKit; do bin/console eccube:plugin:enable --code $code; done' - - - name: "VAddy: connect" - if: ${{ matrix.command2 != '' }} - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh connect - - - name: "VAddy: crawl" - if: ${{ matrix.command2 != '' && success() }} - env: - APP_ENV: "codeception" - DATABASE_URL: "postgres://postgres:password@127.0.0.1:5432/eccube_db" - DATABASE_SERVER_VERSION: "11" - MAILER_URL: "smtp://127.0.0.1:1025" - BASE_URL: "http://${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}:8080" - VADDY_PROXY: "${{ secrets.VADDY_PROXY }}" - VADDY_PROXY_PORT: "${{ secrets.VADDY_PROXY_PORT }}" - VADDY_VERIFICATION_CODE: "${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" - VADDY_CRAWL: "${{ matrix.command2 }}" - run: | - vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:begin - vendor/bin/codecept -vvv run -g vaddy acceptance --env chrome,local,vaddy --html report.html ${{ matrix.command2 }} || true - vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:commit - - - name: Upload report - if: ${{ matrix.command2 != '' && success() }} - uses: actions/upload-artifact@v2 - with: - name: crawl-reports - path: codeception/_output/**/* - - - name: "VAddy: disconnect" - if: ${{ matrix.command2 }} - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh disconnect - - - name: "VAddy: scan" - if: ${{ matrix.command2 != '' && success() }} - continue-on-error: true - env: - VADDY_CRAWL: "${{ matrix.command2 }}" - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh scan - - - name: "EC-CUBE: stop" - if: ${{ matrix.command2 }} - continue-on-error: true - run: docker rm -f -v eccube - - - name: "Scan 3" - if: ${{ matrix.command3 != '' }} - run: echo 'Scan 3' - - - name: "EC-CUBE: run" - if: ${{ matrix.command3 != '' }} - run: | - docker run \ - -e APP_ENV=dev \ - -e APP_DEBUG=1 \ - -e DATABASE_URL="postgres://postgres:password@172.17.0.1:5432/eccube_db" \ - -e DATABASE_SERVER_VERSION=11 \ - -e MAILER_URL="smtp://172.17.0.1:1025" \ - -v ${PWD}/html:/tmp/html \ - --rm -d -p 8080:80 --name eccube ec-cube - docker cp ../eccube.tar.gz eccube:/tmp/ - docker exec -w /tmp eccube bash -c "rm -rf /var/www/html; tar xf /tmp/eccube.tar.gz -C /var/www; mv /var/www/ec-cube /var/www/html; chown -R www-data: /var/www/html" - docker exec eccube bash -c "rm -rf /var/www/html/html; ln -s /tmp/html /var/www/html/html;" - docker exec -u www-data eccube bin/console eccube:install -n - docker exec -u www-data -e VADDY_VERIFICATION_CODE=${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }} eccube bash -c 'echo ${VADDY_VERIFICATION_CODE} > vaddy-${VADDY_VERIFICATION_CODE}.html' - docker exec -u www-data eccube bash -c 'for code in Api Coupon4 GMC MailMagazine4 ProductReview4 Recommend4 RelatedProduct4 SalesReport4 Securitychecker4 SiteKit; do bin/console eccube:plugin:enable --code $code; done' - - - name: "VAddy: connect" - if: ${{ matrix.command3 != '' }} - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh connect - - - name: "VAddy: crawl" - if: ${{ matrix.command3 != '' && success() }} - env: - APP_ENV: "codeception" - DATABASE_URL: "postgres://postgres:password@127.0.0.1:5432/eccube_db" - DATABASE_SERVER_VERSION: "11" - MAILER_URL: "smtp://127.0.0.1:1025" - BASE_URL: "http://${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}:8080" - VADDY_PROXY: "${{ secrets.VADDY_PROXY }}" - VADDY_PROXY_PORT: "${{ secrets.VADDY_PROXY_PORT }}" - VADDY_VERIFICATION_CODE: "${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" - VADDY_CRAWL: "${{ matrix.command3 }}" - run: | - vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:begin - vendor/bin/codecept -vvv run -g vaddy acceptance --env chrome,local,vaddy --html report.html ${{ matrix.command3 }} || true - vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:commit - - - name: Upload report - if: ${{ matrix.command3 != '' && success() }} - uses: actions/upload-artifact@v2 - with: - name: crawl-reports - path: codeception/_output/**/* - - - name: "VAddy: disconnect" - if: ${{ matrix.command3 }} - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh disconnect - - - name: "VAddy: scan" - if: ${{ matrix.command3 != '' && success() }} - continue-on-error: true - env: - VADDY_CRAWL: "${{ matrix.command3 }}" - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh scan - - - name: "EC-CUBE: stop" - if: ${{ matrix.command3 }} - continue-on-error: true - run: docker rm -f -v eccube - - - name: "Scan 4" - if: ${{ matrix.command4 != '' }} - run: echo 'Scan 4' - - - name: "EC-CUBE: run" - if: ${{ matrix.command4 != '' }} - run: | - docker run \ - -e APP_ENV=dev \ - -e APP_DEBUG=1 \ - -e DATABASE_URL="postgres://postgres:password@172.17.0.1:5432/eccube_db" \ - -e DATABASE_SERVER_VERSION=11 \ - -e MAILER_URL="smtp://172.17.0.1:1025" \ - -v ${PWD}/html:/tmp/html \ - --rm -d -p 8080:80 --name eccube ec-cube - docker cp ../eccube.tar.gz eccube:/tmp/ - docker exec -w /tmp eccube bash -c "rm -rf /var/www/html; tar xf /tmp/eccube.tar.gz -C /var/www; mv /var/www/ec-cube /var/www/html; chown -R www-data: /var/www/html" - docker exec eccube bash -c "rm -rf /var/www/html/html; ln -s /tmp/html /var/www/html/html;" - docker exec -u www-data eccube bin/console eccube:install -n - docker exec -u www-data -e VADDY_VERIFICATION_CODE=${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }} eccube bash -c 'echo ${VADDY_VERIFICATION_CODE} > vaddy-${VADDY_VERIFICATION_CODE}.html' - docker exec -u www-data eccube bash -c 'for code in Api Coupon4 GMC MailMagazine4 ProductReview4 Recommend4 RelatedProduct4 SalesReport4 Securitychecker4 SiteKit; do bin/console eccube:plugin:enable --code $code; done' - - - name: "VAddy: connect" - if: ${{ matrix.command4 != '' }} - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh connect - - - name: "VAddy: crawl" - if: ${{ matrix.command4 != '' && success() }} - env: - APP_ENV: "codeception" - DATABASE_URL: "postgres://postgres:password@127.0.0.1:5432/eccube_db" - DATABASE_SERVER_VERSION: "11" - MAILER_URL: "smtp://127.0.0.1:1025" - BASE_URL: "http://${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}:8080" - VADDY_PROXY: "${{ secrets.VADDY_PROXY }}" - VADDY_PROXY_PORT: "${{ secrets.VADDY_PROXY_PORT }}" - VADDY_VERIFICATION_CODE: "${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" - VADDY_CRAWL: "${{ matrix.command4 }}" - run: | - vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:begin - vendor/bin/codecept -vvv run -g vaddy acceptance --env chrome,local,vaddy --html report.html ${{ matrix.command4 }} || true - vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:commit - - - name: Upload report - if: ${{ matrix.command4 != '' && success() }} - uses: actions/upload-artifact@v2 - with: - name: crawl-reports - path: codeception/_output/**/* - - - name: "VAddy: disconnect" - if: ${{ matrix.command4 }} - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh disconnect - - - name: "VAddy: scan" - if: ${{ matrix.command4 != '' && success() }} - continue-on-error: true - env: - VADDY_CRAWL: "${{ matrix.command4 }}" - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh scan - - - name: "EC-CUBE: stop" - if: ${{ matrix.command4 }} - continue-on-error: true - run: docker rm -f -v eccube - - - name: "Scan 5" - if: ${{ matrix.command5 != '' }} - run: echo 'Scan 5' - - - name: "EC-CUBE: run" - if: ${{ matrix.command5 != '' }} - run: | - docker run \ - -e APP_ENV=dev \ - -e APP_DEBUG=1 \ - -e DATABASE_URL="postgres://postgres:password@172.17.0.1:5432/eccube_db" \ - -e DATABASE_SERVER_VERSION=11 \ - -e MAILER_URL="smtp://172.17.0.1:1025" \ - -v ${PWD}/html:/tmp/html \ - --rm -d -p 8080:80 --name eccube ec-cube - docker cp ../eccube.tar.gz eccube:/tmp/ - docker exec -w /tmp eccube bash -c "rm -rf /var/www/html; tar xf /tmp/eccube.tar.gz -C /var/www; mv /var/www/ec-cube /var/www/html; chown -R www-data: /var/www/html" - docker exec eccube bash -c "rm -rf /var/www/html/html; ln -s /tmp/html /var/www/html/html;" - docker exec -u www-data eccube bin/console eccube:install -n - docker exec -u www-data -e VADDY_VERIFICATION_CODE=${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }} eccube bash -c 'echo ${VADDY_VERIFICATION_CODE} > vaddy-${VADDY_VERIFICATION_CODE}.html' - docker exec -u www-data eccube bash -c 'for code in Api Coupon4 GMC MailMagazine4 ProductReview4 Recommend4 RelatedProduct4 SalesReport4 Securitychecker4 SiteKit; do bin/console eccube:plugin:enable --code $code; done' - - - name: "VAddy: connect" - if: ${{ matrix.command5 != '' }} - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh connect - - - name: "VAddy: crawl" - if: ${{ matrix.command5 != '' && success() }} - env: - APP_ENV: "codeception" - DATABASE_URL: "postgres://postgres:password@127.0.0.1:5432/eccube_db" - DATABASE_SERVER_VERSION: "11" - MAILER_URL: "smtp://127.0.0.1:1025" - BASE_URL: "http://${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}:8080" - VADDY_PROXY: "${{ secrets.VADDY_PROXY }}" - VADDY_PROXY_PORT: "${{ secrets.VADDY_PROXY_PORT }}" - VADDY_VERIFICATION_CODE: "${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" - VADDY_CRAWL: "${{ matrix.command5 }}" - run: | - vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:begin - vendor/bin/codecept -vvv run -g vaddy acceptance --env chrome,local,vaddy --html report.html ${{ matrix.command5 }} || true - vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:commit - - - name: Upload report - if: ${{ matrix.command5 != '' && success() }} - uses: actions/upload-artifact@v2 - with: - name: crawl-reports - path: codeception/_output/**/* - - - name: "VAddy: disconnect" - if: ${{ matrix.command5 }} - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh disconnect - - - name: "VAddy: scan" - if: ${{ matrix.command5 != '' && success() }} - continue-on-error: true - env: - VADDY_CRAWL: "${{ matrix.command5 }}" - working-directory: /tmp/go-vaddy-master/privatenet - run: ./vaddy_privatenet.sh scan - - - name: "EC-CUBE: stop" - if: ${{ matrix.command5 }} - continue-on-error: true - run: docker rm -f -v eccube - -# - name: VAddy private net logs -# if: ${{ always() }} -# working-directory: /tmp/go-vaddy-master/privatenet -# run: cat vaddy/*.txt