Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre and postinstall script to fix custom build with ckeditor and custom builds on windows #96

Merged
merged 22 commits into from
Mar 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ff6d9f1
Add post and pre install script symlinks and add browserlistrc file
alexander-schranz Mar 3, 2021
1b7630a
Renamte .babelrc to babel.config.json
alexander-schranz Mar 8, 2021
51e06f2
Test against sulu/sulu branch
alexander-schranz Mar 8, 2021
93d497f
Change package.json order
alexander-schranz Mar 8, 2021
e8274d6
Remove cacheDirectory and cacheCompression from babel.config.json
alexander-schranz Mar 8, 2021
6252970
Try with babelrcroots
alexander-schranz Mar 8, 2021
77af1da
Try with babelrcroots directories
alexander-schranz Mar 8, 2021
3e69159
Add build version
alexander-schranz Mar 8, 2021
c5585f8
Add windows workflow for test application
alexander-schranz Mar 8, 2021
6536eb8
Fix test windows on github ci
alexander-schranz Mar 8, 2021
6014be3
Fix build
alexander-schranz Mar 8, 2021
87f7c00
Apply suggestions from code review
alexander-schranz Mar 9, 2021
e205c87
Remove appveyor integration
alexander-schranz Mar 9, 2021
eecbb25
Merge branch 'feature/link-dependencies' of github.com:alexander-schr…
alexander-schranz Mar 9, 2021
fcf580d
Update composer and test application
alexander-schranz Mar 9, 2021
c6267c6
Apply suggestions from code review
alexander-schranz Mar 9, 2021
39ed499
Fix test matrix
alexander-schranz Mar 9, 2021
e4665ab
Fix node version string
alexander-schranz Mar 9, 2021
30e4d6b
Remove test for npm install npm run build
alexander-schranz Mar 9, 2021
2da9ebe
Test windows npm install and npm run build
alexander-schranz Mar 9, 2021
3114244
Remove highest dependency check
alexander-schranz Mar 9, 2021
a65bd72
Apply suggestions from code review
alexander-schranz Mar 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions .github/workflows/test-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,124 @@ jobs:
- name: Build admin ui
run: npm run build
working-directory: ${{ matrix.working-directory }}/assets/admin

php-windows:
name: "PHP ${{ matrix.php-version }} and Node.js ${{ matrix.node-version }} on Windows"

runs-on: windows-latest

env:
JACKRABBIT_VERSION: 2.20.2
APP_ENV: test
APP_SECRET: a448d1dfcaa563fce56c2fd9981f662b
MAILER_URL: null://localhost
SULU_ADMIN_EMAIL:
SYMFONY_DEPRECATIONS_HELPER: weak
PHPCR_TRANSPORT: jackrabbit
DATABASE_URL: mysql://root:root@127.0.0.1:3306/sulu_test?serverVersion=${{ matrix.mysql-version }}
DATABASE_CHARSET: utf8mb4
DATABASE_COLLATE: utf8mb4_unicode_ci

strategy:
fail-fast: false
matrix:
include:
- php-version: '7.4'
alexander-schranz marked this conversation as resolved.
Show resolved Hide resolved
node-version: '14'
mysql-version: '8.0'
phpcr-transport: 'jackrabbit'
php-extensions: 'ctype, iconv, intl, mysql, pdo_mysql, php_fileinfo, imagick'
tools: 'composer'

steps:
- name: Checkout project
uses: actions/checkout@v2

- name: Install and configure Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install and configure PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: ${{ matrix.php-extensions }}
tools: ${{ matrix.tools }}
ini-values: 'memory_limit=-1'

- name: Install and configure MySQL
uses: shogo82148/actions-setup-mysql@v1.0.1
with:
mysql-version: ${{ matrix.mysql-version }}
root-password: 'root'
my-cnf: |
[mysqld]
default-authentication-plugin=mysql_native_password

- name: Download jackrabbit
if: ${{ matrix.phpcr-transport == 'jackrabbit' }}
uses: carlosperate/download-file-action@v1.0.3
with:
file-url: http://archive.apache.org/dist/jackrabbit/${{ env.JACKRABBIT_VERSION }}/jackrabbit-standalone-${{ env.JACKRABBIT_VERSION }}.jar
file-name: jackrabbit-standalone.jar
location: downloads

- name: Run jackrabbit
if: ${{ matrix.phpcr-transport == 'jackrabbit' }}
run: powershell -command "Start-Process -FilePath java -ArgumentList '-jar downloads/jackrabbit-standalone.jar'"

- name: Require jackrabbit dependencies
if: ${{ matrix.phpcr-transport == 'jackrabbit' }}
run: |
composer remove jackalope/jackalope-doctrine-dbal --dev --no-interaction --no-update
composer require jackalope/jackalope-jackrabbit:^1.4 --no-interaction --no-update

- name: Install composer dependencies
uses: ramsey/composer-install@v1

- name: Build sulu
run: bin/adminconsole sulu:build dev --no-interaction

alexander-schranz marked this conversation as resolved.
Show resolved Hide resolved
- name: Build container
run: |
bin/adminconsole cache:clear --env dev
bin/websiteconsole cache:clear --env dev
bin/adminconsole cache:clear --env test
bin/websiteconsole cache:clear --env test
bin/adminconsole cache:clear --env stage
bin/websiteconsole cache:clear --env stage
bin/adminconsole cache:clear --env prod
bin/websiteconsole cache:clear --env prod

- name: Lint container
run: |
bin/adminconsole lint:container --env dev
bin/websiteconsole lint:container --env dev
bin/adminconsole lint:container --env test
bin/websiteconsole lint:container --env test
bin/adminconsole lint:container --env stage
bin/websiteconsole lint:container --env stage
bin/adminconsole lint:container --env prod
bin/websiteconsole lint:container --env prod

- name: Lint code
run: |
bin/adminconsole doctrine:ensure-production-settings --env prod
bin/adminconsole doctrine:schema:validate
bin/adminconsole lint:twig templates
bin/adminconsole lint:yaml config

- name: Execute test cases
run: bin/phpunit

- name: Test download-language script
run: bin/adminconsole sulu:admin:download-language nl

- name: Install npm dependencies
run: npm install
working-directory: assets/admin

- name: Build admin ui
run: npm run build
working-directory: assets/admin
81 changes: 0 additions & 81 deletions appveyor.yml

This file was deleted.

3 changes: 3 additions & 0 deletions assets/admin/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
last 2 versions and not dead
not ie < 12
not ie_mob < 12
1 change: 1 addition & 0 deletions assets/admin/.babelrc → assets/admin/babel.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"plugins": [
["@babel/plugin-proposal-decorators", {"legacy": true}],
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-transform-flow-strip-types",
["@babel/plugin-proposal-class-properties", {"loose": true}]
]
}
29 changes: 15 additions & 14 deletions assets/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"repository": "https://github.com/sulu/skeleton.git",
"scripts": {
"preinstall": "node ../../vendor/sulu/sulu/preinstall.js",
"postinstall": "node ../../vendor/sulu/sulu/postinstall.js",
"build": "webpack --mode production",
"watch": "webpack --mode development -w"
},
Expand All @@ -12,20 +13,20 @@
"mobx-react": "^5.0.0",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"sulu-admin-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/AdminBundle/Resources/js",
"sulu-audience-targeting-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/AudienceTargetingBundle/Resources/js",
"sulu-category-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/CategoryBundle/Resources/js",
"sulu-contact-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/ContactBundle/Resources/js",
"sulu-custom-url-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/CustomUrlBundle/Resources/js",
"sulu-location-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/LocationBundle/Resources/js",
"sulu-media-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/MediaBundle/Resources/js",
"sulu-page-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/PageBundle/Resources/js",
"sulu-preview-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/PreviewBundle/Resources/js",
"sulu-route-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/RouteBundle/Resources/js",
"sulu-search-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/SearchBundle/Resources/js",
"sulu-security-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/SecurityBundle/Resources/js",
"sulu-snippet-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/SnippetBundle/Resources/js",
"sulu-website-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Resources/js"
"sulu-admin-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/AdminBundle/Resources/js",
"sulu-audience-targeting-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/AudienceTargetingBundle/Resources/js",
"sulu-category-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/CategoryBundle/Resources/js",
"sulu-contact-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/ContactBundle/Resources/js",
"sulu-custom-url-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/CustomUrlBundle/Resources/js",
"sulu-location-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/LocationBundle/Resources/js",
"sulu-media-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/MediaBundle/Resources/js",
"sulu-page-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/PageBundle/Resources/js",
"sulu-preview-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/PreviewBundle/Resources/js",
"sulu-route-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/RouteBundle/Resources/js",
"sulu-search-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/SearchBundle/Resources/js",
"sulu-security-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/SecurityBundle/Resources/js",
"sulu-snippet-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/SnippetBundle/Resources/js",
"sulu-website-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Resources/js"
},
"devDependencies": {
"@babel/core": "^7.5.5",
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"friendsofsymfony/http-cache-bundle": "^2.8",
"handcraftedinthealps/zendsearch": "^2.0",
"jackalope/jackalope-doctrine-dbal": "^1.3",
"sulu/sulu": "~2.1.9",
"sulu/sulu": "~2.1.9 || 2.1.*@dev",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how should we handle this? i guess we need to remember to reset this before releasing the next version? 🤔

Copy link
Member Author

@alexander-schranz alexander-schranz Mar 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on release this always should be set to the correct version: ~2.1.10

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good - hope we remember that 🙂

"symfony/config": "^5.1",
"symfony/dotenv": "^5.1",
"symfony/flex": "^1.2",
Expand Down
Loading