Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
!ci
!config
!data
!database
!migrations
!docker
!languages
!library
Expand Down
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
APP_ENV=prod
APP_DEBUG=false
16 changes: 9 additions & 7 deletions .github/workflows/run-cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
push:
branches:
- main
- upgrade
- feature/sf_upgrade_44
pull_request:
workflow_dispatch:
# run at 6 hour UTC
Expand All @@ -14,24 +16,24 @@ jobs:
timeout-minutes: 30
strategy:
matrix:
php: [ php72 ]
php: [ php82 ]
env:
PROD_PHP: php72
PROD_PHP: php82
DOCKER_COMPOSE: docker compose -f docker-compose.yml -f docker-compose-${{matrix.php}}.yml
steps:
- name: Checkout
uses: actions/checkout@master
- name: chown some dirs
run: |
mkdir tmp vendor && sudo chown -R 33 app/ theme/ web/ tmp/ vendor/
mkdir tmp vendor && sudo chown -R 33 theme/ public/ tmp/ vendor/ var/ config/
- name: Build Docker environmnent
if: always()
run: |
cd docker &&
${DOCKER_COMPOSE} up -d --build &&
docker compose exec -T --user www-data engine.dev.openconext.local bash -c '
SYMFONY_ENV=ci composer install --prefer-dist -n -o --ignore-platform-reqs && \
./app/console cache:clear --env=ci && \
composer install --prefer-dist -n -o --ignore-platform-reqs && \
./bin/console cache:clear --env=ci && \
cd theme && CYPRESS_INSTALL_BINARY=0 yarn install --frozen-lockfile && EB_THEME=skeune yarn build
'
- name: Run Cypress integration tests
Expand All @@ -42,11 +44,11 @@ jobs:
EB_THEME=skeune ./theme/scripts/prepare-test.js
' && \
docker compose exec -T cypress bash -c '
cd e2e && yarn install && cypress run --spec cypress/integration/skeune/**/*.spec.js,cypress/integration/shared/*.spec.js --browser=chrome --headless
yarn install && cypress run --spec "cypress/integration/skeune/**/*.spec.js,cypress/integration/shared/*.spec.js" --browser=chrome --headless
' && \
docker compose exec -T --user www-data engine.dev.openconext.local bash -c '
EB_THEME=openconext ./theme/scripts/prepare-test.js
' && \
docker compose exec -T cypress bash -c '
cd e2e && cypress run --spec cypress/integration/openconext/**/*.spec.js --browser=chrome --headless
cypress run --spec "cypress/integration/openconext/**/*.spec.js" --browser=chrome --headless
'
43 changes: 18 additions & 25 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
push:
branches:
- main
- upgrade
- feature/sf_upgrade_44
pull_request:
# run at 6 hour UTC
schedule:
Expand All @@ -13,25 +15,24 @@ jobs:
timeout-minutes: 30
strategy:
matrix:
# php82 is ready to run alongside the 72, but is not enabled now as the code is not 82 compatible yet
php: [ php72 ]
php: [ php82 ]
env:
PROD_PHP: php72
PROD_PHP: php82
DOCKER_COMPOSE: docker compose -f docker-compose.yml -f docker-compose-${{matrix.php}}.yml
steps:
- name: Checkout
uses: actions/checkout@master
- name: chown some dirs
run: |
mkdir tmp vendor && sudo chown -R 33 app/ theme/ web/ tmp/ vendor/
mkdir tmp vendor && sudo chown -R 33 theme/ public/ tmp/ vendor/ var/ tests/ config/
- name: Build Docker environmnent
if: always()
run: |
cd docker &&
${DOCKER_COMPOSE} up -d --build &&
docker compose exec -T --user www-data engine.dev.openconext.local bash -c '
SYMFONY_ENV=ci composer install --prefer-dist -n -o --ignore-platform-reqs && \
./app/console cache:clear --env=ci && \
composer install --prefer-dist -n -o --ignore-platform-reqs && \
./bin/console cache:clear --env=ci && \
cd theme && CYPRESS_INSTALL_BINARY=0 yarn install --frozen-lockfile && EB_THEME=skeune yarn build
'
- name: Run code quality tests
Expand All @@ -47,58 +48,50 @@ jobs:
echo -e "\nDoc header check\n" && \
./vendor/bin/docheader check src/ tests/ library/ --exclude-dir resources --exclude-dir languages
'
env:
SYMFONY_ENV: ci
- name: Run unit tests
if: always()
run: |
cd docker && APP_ENV=ci SYMFONY_ENV=ci docker compose exec -T --user www-data engine.dev.openconext.local bash -c '
cd docker && APP_ENV=ci docker compose exec -e XDEBUG_MODE=coverage -T --user www-data engine.dev.openconext.local bash -c '
echo -e "\nInstalling database fixtures...\n" && \
./app/console doctrine:schema:drop --force --env=ci && \
./app/console doctrine:schema:create --env=ci && \
./bin/console doctrine:schema:drop --force --env=ci && \
./bin/console doctrine:schema:create --env=ci && \
echo -e "\nPHPUnit legacy tests\n" && \
./vendor/bin/phpunit --configuration=./tests/phpunit.xml --testsuite=eb4 --coverage-text && \
echo -e "\nPHPUnit unit tests\n" && \
./vendor/bin/phpunit --configuration=./tests/phpunit.xml --testsuite=unit --coverage-text && \
echo -e "\nPHPUnit API acceptance tests\n" && \
APP_ENV=ci ./vendor/bin/phpunit --configuration=./tests/phpunit.xml --testsuite=functional --coverage-text && \
APP_ENV=test ./vendor/bin/phpunit --configuration=./tests/phpunit.xml --testsuite=functional --coverage-text && \
echo -e "\nPHPUnit integration tests\n" && \
./vendor/bin/phpunit --configuration=./tests/phpunit.xml --testsuite=integration --coverage-text
'
env:
SYMFONY_ENV: ci
- name: Run acceptance tests
if: always()
run: |
cd docker && docker compose exec -T --user www-data engine.dev.openconext.local bash -c '
echo -e "\nInstalling database fixtures...\n" && \
./app/console doctrine:schema:drop --force --env=ci && \
./app/console doctrine:schema:create --env=ci && \
./bin/console doctrine:schema:drop --force --env=ci && \
./bin/console doctrine:schema:create --env=ci && \
echo -e "\nPreparing frontend assets\n" && \
EB_THEME=skeune ./theme/scripts/prepare-test.js > /dev/null && \
echo -e "\nRun the Behat tests\n" && \
./vendor/bin/behat -c ./tests/behat-ci.yml --suite default -vv --format progress --strict && \
echo -e "\nBehat tests (with selenium and headless Chrome)\n" && \
./vendor/bin/behat -c ./tests/behat-ci.yml --suite selenium -vv --format progress --strict
./vendor/bin/behat -c ./tests/behat.yml --suite default -vv --format pretty --strict && \
echo -e "\nBehat tests (with headless Chrome)\n" && \
./vendor/bin/behat -c ./tests/behat.yml --suite functional -vv --format pretty --strict
'
env:
SYMFONY_ENV: ci
- name: Run linting tests
if: always()
run: |
cd docker && docker compose exec -T --user www-data engine.dev.openconext.local bash -c '
echo -e "\nTwig lint\n" && \
app/console lint:twig theme/ && \
bin/console lint:twig theme/ && \
cd theme && \
echo -e "\nLint frontend assets\n" && \
yarn lint
'
env:
SYMFONY_ENV: ci
- name: Show log on failure
if: failure()
run: |
cd docker && docker compose exec -T engine.dev.openconext.local cat /var/www/html/app/logs/ci/ci.log
cd docker && docker compose exec -T engine.dev.openconext.local cat /var/www/html/var/log/application.log
- name: Send notification on production build nightly build failure
uses: sonots/slack-notice-action@v3
with:
Expand Down
74 changes: 45 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,31 +1,47 @@
/build
/vendor/
/www/authentication/generated/
bin/ignore_me.php
/web/bundles
/web/app_dev.php
/web/javascripts/*
/web/stylesheets/*
/web/images/*
/web/fonts/*
!/web/fonts/.gitkeep
/app/cache
/app/logs
/app/SymfonyRequirements.php
/app/check.php
/tmp/
/app/config/functional_testing.yml
/app/config/parameters.yml
/app/config/config_local.yml
.idea
local-php-security-checker
/tests/e2e/node_modules
/tests/.phpunit.result.cache
/languages/overrides.*.php
/theme/node_modules
/theme/.sass-cache
/theme/**/visual-regression/screenshots/*
!/theme/**/visual-regression/screenshots/.gitkeep
/theme/**/__image_snapshots__
config/packages/parameters.yml

var/cache/*
var/log/*
!var/cache/.gitkeep
!var/log/.gitkeep

public/fonts
public/images
public/javascripts
public/stylesheets

theme/node_modules
vendor

tests/.phpunit.result.cache
tests/e2e/node_modules

coverage.xml

.idea
.DS_Store

###> symfony/framework-bundle ###
/.env.local
/.env.local.php
/.env.*.local
/config/secrets/prod/prod.decrypt.private.php
/public/bundles/
/var/
/vendor/
###< symfony/framework-bundle ###

###> phpunit/phpunit ###
/phpunit.xml
.phpunit.result.cache
###< phpunit/phpunit ###

###> symfony/phpunit-bridge ###
.phpunit
.phpunit.result.cache
/phpunit.xml
###< symfony/phpunit-bridge ###

###> friends-of-behat/symfony-extension ###
/behat.yml
###< friends-of-behat/symfony-extension ###
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,24 @@ More information about our release strategy can be found in
the [Development Guidelines](https://github.com/OpenConext/OpenConext-engineblock/wiki/Development-Guidelines#release-notes) on
the EngineBlock wiki.

## 7.0.0
Breaking changes please see: [upgrading](UPGRADING.md#700)

Maintenance:
* upgrade to symfony 4.4

### DB json_array
Doctrine no longer supports `json_array` types.
If the production database currently has columns with `COMMENT '(DC2Type:json_array)'`, they need to be changed to `COMMENT '(DC2Type:json)'`.

This is not done in a Migration, as production is not in sync with the schema as defined in the migrations.

Reference query as an example:
```mysql
ALTER TABLE sso_provider_roles_eb5
CHANGE consent_settings consent_settings MEDIUMTEXT DEFAULT NULL COMMENT '(DC2Type:json)';
```

## 6.18.0

Dependencies:
Expand Down
Loading