Skip to content

Commit

Permalink
Remove Codeception
Browse files Browse the repository at this point in the history
  • Loading branch information
nanasess committed Jan 13, 2022
1 parent e4ff04c commit f1c3216
Show file tree
Hide file tree
Showing 39 changed files with 21 additions and 5,284 deletions.
58 changes: 2 additions & 56 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,7 @@ jobs:
php-version: ${{ matrix.php }}

- name: Install to Composer
run: |
composer install --no-interaction -o
composer require php5friends/codeception-phpunit48-wrapper ">=6.0.20" --dev --ignore-platform-req=php
composer require captbaritone/mailcatcher-codeception-module "1.2.1" --dev --ignore-platform-req=php
composer require codeception/codeception "2.4.1" --dev --ignore-platform-req=php
composer remove php5friends/codeception-phpunit48-wrapper --dev --ignore-platform-req=php
composer remove php5friends/phpunit48 --ignore-platform-reqs --dev --ignore-platform-req=php
run: composer install --no-interaction -o

- name: Create ADMIN_DIR
run: |
Expand Down Expand Up @@ -110,59 +104,11 @@ jobs:
phpdbg -qrr data/vendor/bin/phpunit tests/class/SC_SessionFactoryTest.php --coverage-clover=coverage3.xml
mv data/config/config.php.bak data/config/config.php
- name: Install symfony/cli
continue-on-error: true
run: |
wget https://get.symfony.com/cli/installer -O - | bash
sudo mv ~/.symfony/bin/symfony /usr/local/bin/symfony
symfony local:php:list
- 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: Setup C3
run: |
wget https://raw.github.com/Codeception/c3/2.0/c3.php
sed -i 's,/vendor/autoload.php,/data/vendor/autoload.php,g' c3.php
echo "include __DIR__.'/../c3.php';" >> html/define.php
- name: Run to Codeception
continue-on-error: true
env:
DB: ${{ matrix.db }}
USER: ${{ matrix.dbuser }}
DBUSER: ${{ matrix.dbuser }}
DBPASS: ${{ matrix.dbpass }}
DBNAME: ${{ matrix.dbname }}
DBPORT: ${{ matrix.dbport }}
DBSERVER: 127.0.0.1
HTTP_URL: http://127.0.0.1:8085/
HTTPS_URL: http://127.0.0.1:8085/
XDEBUG_MODE: coverage
run: |
sudo phpenmod -s cli xdebug
sudo phpenmod -s fpm xdebug
mv html/admin html/${ADMIN_DIR}
php data/vendor/bin/codecept build
symfony serve -d --no-tls --port=8085 --document-root=html
php data/vendor/bin/codecept run --env chrome,http --skip-group installer --skip-group excludeCoverage --steps --coverage --coverage-xml
mv ./ctests/_output/acceptance\ \(chrome,\ http\).remote.coverage.xml ctests/_output/acceptance.remote.coverage.xml
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
files: ./coverage1.xml,./coverage2.xml,./coverage3.xml,./ctests/_output/acceptance.remote.coverage.xml
files: ./coverage1.xml,./coverage2.xml,./coverage3.xml
# token: ${{ secrets.CODECOV_TOKEN }}
flags: tests
# yml: ./codecov.yml
fail_ci_if_error: true
- name: Upload evidence
uses: actions/upload-artifact@v2
with:
name: coverage-evidence
path: ctests/_output/
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@ jobs:
rm -rf $GITHUB_WORKSPACE/Procfile
rm -rf $GITHUB_WORKSPACE/build.xml
rm -rf $GITHUB_WORKSPACE/README.md
rm -rf $GITHUB_WORKSPACE/codeception.yml
rm -rf $GITHUB_WORKSPACE/php.ini
rm -rf $GITHUB_WORKSPACE/phpinicopy.sh
rm -rf $GITHUB_WORKSPACE/phpinidel.sh
rm -rf $GITHUB_WORKSPACE/*.phar
rm -rf $GITHUB_WORKSPACE/setup.sh
rm -rf $GITHUB_WORKSPACE/setup_heroku.php
rm -rf $GITHUB_WORKSPACE/svn_propset.sh
rm -rf $GITHUB_WORKSPACE/ctests
rm -rf $GITHUB_WORKSPACE/playwright*
rm -rf $GITHUB_WORKSPACE/e2e-tests
rm -rf $GITHUB_WORKSPACE/tests
rm -rf $GITHUB_WORKSPACE/templates
rm -rf $GITHUB_WORKSPACE/patches
Expand Down
190 changes: 1 addition & 189 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,7 @@ jobs:
${{ runner.os }}-composer-
- name: composer install
run: |
composer install --no-interaction -o
composer require php5friends/codeception-phpunit48-wrapper "~6.0.20" --dev
composer require captbaritone/mailcatcher-codeception-module "1.2.1" --dev
composer require codeception/codeception "2.4.1" --dev
run: composer install --no-interaction -o

- name: Setup PHP
uses: nanasess/setup-php@master
Expand Down Expand Up @@ -134,35 +130,6 @@ jobs:
- name: Run to PHPUnit SessionFactory
run: data/vendor/bin/phpunit tests/class/SC_SessionFactoryTest.php

- 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 to Codeception
env:
DB: ${{ matrix.db }}
USER: ${{ matrix.dbuser }}
DBUSER: ${{ matrix.dbuser }}
DBPASS: ${{ matrix.dbpass }}
DBNAME: ${{ matrix.dbname }}
DBPORT: ${{ matrix.dbport }}
DBSERVER: 127.0.0.1
HTTP_URL: https://127.0.0.1:8085/
HTTPS_URL: https://127.0.0.1:8085/
run: |
mv html/admin html/${ADMIN_DIR}
php data/vendor/bin/codecept build
symfony serve -d --allow-http --port=8085 --document-root=html
php data/vendor/bin/codecept run --env chrome --skip-group installer --steps
- name: Upload evidence
if: failure()
uses: actions/upload-artifact@v2
with:
name: linux-php${{ matrix.php }}-${{ matrix.db }}-evidence
path: ctests/_output/
- name: Upload logs
if: failure()
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -239,158 +206,3 @@ jobs:
with:
name: windows-php${{ matrix.php }}-${{ matrix.db }}-logs
path: data\logs

install-to-linux:
name: Install to Linux
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-18.04 ]
php: [ 5.4, 5.5, 5.6, 7.1, 7.2, 7.3, 7.4, 8.0 ]
db: [ mysql, pgsql ]
include:
- db: mysql
dbport: '3306'
dbuser: 'root'
dbpass: 'password'
dbname: 'eccube_db'
- db: pgsql
dbport: '5432'
dbuser: 'postgres'
dbpass: 'password'
dbname: 'eccube_db'
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:12
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: postgres
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@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: composer install
run: |
composer install --no-interaction -o
composer require php5friends/codeception-phpunit48-wrapper "~6.0.20" --dev
composer require captbaritone/mailcatcher-codeception-module "1.2.1" --dev
composer require codeception/codeception "2.4.1" --dev
- name: Setup PHP
uses: nanasess/setup-php@master
with:
php-version: ${{ matrix.php }}

- name: php-fpm
env:
PHP_VERSION: ${{ matrix.php }}
run: |
if [ -f /lib/systemd/system/php${PHP_VERSION}-fpm.service ]
then
sudo systemctl enable php${PHP_VERSION}-fpm
fi
- name: Install symfony/cli
# server:ca:install でエラーは出るが利用可能
continue-on-error: true
run: |
sudo apt-fast -y install libnss3-tools
wget https://get.symfony.com/cli/installer -O - | bash
sudo mv ~/.symfony/bin/symfony /usr/local/bin/symfony
symfony local:php:list
symfony server:ca:install
- 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: CREATE mysql DATABASE
if: matrix.db == 'mysql'
env:
DB: ${{ matrix.db }}
USER: ${{ matrix.dbuser }}
DBUSER: ${{ matrix.dbuser }}
DBPASS: ${{ matrix.dbpass }}
DBNAME: ${{ matrix.dbname }}
DBPORT: ${{ matrix.dbport }}
DBSERVER: 127.0.0.1
run: mysql --user=${DBUSER} --password=${DBPASS} -h ${DBSERVER} -P ${DBPORT} -e "CREATE DATABASE ${DBNAME} DEFAULT COLLATE=utf8_general_ci;"

- name: CREATE pgsql DATABASE
if: matrix.db == 'pgsql'
env:
DB: ${{ matrix.db }}
USER: ${{ matrix.dbuser }}
DBUSER: ${{ matrix.dbuser }}
DBPASS: ${{ matrix.dbpass }}
DBNAME: ${{ matrix.dbname }}
DBPORT: ${{ matrix.dbport }}
DBSERVER: 127.0.0.1
run: |
sudo apt-fast install -y postgresql-client
export PGPASSWORD=${DBPASS}
psql -h ${DBSERVER} -U ${DBUSER} -p ${DBPORT} -c "CREATE DATABASE ${DBNAME};"
- name: Run to Codeception
env:
DB: ${{ matrix.db }}
USER: ${{ matrix.dbuser }}
DBUSER: ${{ matrix.dbuser }}
DBPASS: ${{ matrix.dbpass }}
DBNAME: ${{ matrix.dbname }}
DBPORT: ${{ matrix.dbport }}
DBSERVER: 127.0.0.1
HTTP_URL: https://127.0.0.1:8085/
HTTPS_URL: https://127.0.0.1:8085/
run: |
php data/vendor/bin/codecept build
symfony serve -d --allow-http --port=8085 --document-root=html
php data/vendor/bin/codecept run --env chrome --group installer --steps acceptance InstallerCept
- name: Upload evidence
if: failure()
uses: actions/upload-artifact@v2
with:
name: install-linux-php${{ matrix.php }}-evidence
path: ctests/_output/
- name: Upload logs
if: failure()
uses: actions/upload-artifact@v2
with:
name: install-linux-php${{ matrix.php }}-logs
path: html/install/temp/
19 changes: 1 addition & 18 deletions .github/workflows/penetration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,7 @@ name: Penetration testing for EC-CUBE
on:
schedule:
- cron: '0 15 * * 1'
push:
branches:
- '*'
tags:
- '*'
paths:
- '**'
- '!*.md'
pull_request:
paths:
- '**'
- '!*.md'

jobs:
PenetrationTest:
name: Penetration testing
Expand Down Expand Up @@ -70,12 +59,6 @@ jobs:
FORCE_COLOR: 1
run: yarn test:attack e2e-tests/${GROUP}

# - name: Upload evidence
# if: failure()
# uses: actions/upload-artifact@v2
# with:
# name: linux-php${{ matrix.php }}-${{ matrix.db }}-evidence
# path: ctests/_output/
- env:
GROUP: ${{ matrix.group }}
if: always()
Expand Down
29 changes: 0 additions & 29 deletions codeception.yml

This file was deleted.

2 changes: 0 additions & 2 deletions ctests/_bootstrap.php

This file was deleted.

1 change: 0 additions & 1 deletion ctests/_data/dump.sql

This file was deleted.

Loading

0 comments on commit f1c3216

Please sign in to comment.