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 11 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
101 changes: 101 additions & 0 deletions .github/workflows/test-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,104 @@ jobs:
- name: Build admin ui
run: npm run build
working-directory: ${{ matrix.working-directory }}/assets/admin

php-windows:
name: "PHP ${{ matrix.php-version }} on Windows (mysql ${{ matrix.mysql-version }}, ${{ matrix.phpcr-transport }}, ${{ matrix.dependency-versions }})"
alexander-schranz marked this conversation as resolved.
Show resolved Hide resolved
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
mysql-version: '8.0'
phpcr-transport: 'jackrabbit'
dependency-versions: 'highest'
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure if we will test anything else here 🙂

Copy link
Member Author

Choose a reason for hiding this comment

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

IDK

Copy link
Member Author

Choose a reason for hiding this comment

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

highest is I think always the default for composer but maybe it has an impact if a lock is commitet or not to this github action. but for our case I think it doesn't matter and would keep as it is

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: '14'
alexander-schranz marked this conversation as resolved.
Show resolved Hide resolved

- 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: Cache jackrabbit runnable
alexander-schranz marked this conversation as resolved.
Show resolved Hide resolved
uses: actions/cache@v2
id: jackrabbit-cache
if: ${{ matrix.phpcr-transport == 'jackrabbit' }}
with:
path: downloads
key: ${{ runner.os }}-jackrabbit-${{ env.JACKRABBIT_VERSION }}

- name: Download jackrabbit
if: ${{ matrix.phpcr-transport == 'jackrabbit' && steps.jackrabbit-cache.outputs.cache-hit != 'true' }}
run: |
mkdir downloads
cd downloads
curl -O http://archive.apache.org/dist/jackrabbit/${{ env.JACKRABBIT_VERSION }}/jackrabbit-standalone-${{ env.JACKRABBIT_VERSION }}.jar
cd -

- name: Run jackrabbit
if: ${{ matrix.phpcr-transport == 'jackrabbit' }}
run: powershell -command "Start-Process -FilePath java -ArgumentList '-jar downloads/jackrabbit-standalone-${{ env.JACKRABBIT_VERSION }}.jar'"
alexander-schranz marked this conversation as resolved.
Show resolved Hide resolved

- 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
with:
dependency-versions: ${{ matrix.dependency-versions }}

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

alexander-schranz marked this conversation as resolved.
Show resolved Hide resolved
- 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
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": "dev-feature/link-dependencies as 2.1.10",
alexander-schranz marked this conversation as resolved.
Show resolved Hide resolved
"symfony/config": "^5.1",
"symfony/dotenv": "^5.1",
"symfony/flex": "^1.2",
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions public/build/admin/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"main.css": "build/admin/main.b5838101ff6f209c54da.css",
"main.js": "build/admin/main.b5838101ff6f209c54da.js",
"main.js.map": "build/admin/main.b5838101ff6f209c54da.js.map",
"main.css": "build/admin/main.299ab210e717d74ee262.css",
"main.js": "build/admin/main.299ab210e717d74ee262.js",
"main.js.map": "build/admin/main.299ab210e717d74ee262.js.map",
"/build/admin/fonts/font-awesome.min.css": "/build/admin/fonts/fontawesome-webfont.f691f37e57f04c152e2315ab7dbad881.woff",
"/build/admin/fonts/global.scss": "/build/admin/fonts/open-sans-v15-latin-regular.ec806460121999bcfb12bc264d46d41e.woff2",
"/build/admin/fonts/sulu-icon.css": "/build/admin/fonts/sulu.ab0d4220533e95b7dbd01d80b26b0710.woff",
Expand Down