From 8fca91abf18a69e2e1b8f29cd0ecd4a1c6bdbb17 Mon Sep 17 00:00:00 2001 From: Dominik Pfaffenbauer Date: Mon, 9 Sep 2024 14:22:46 +0200 Subject: [PATCH 1/6] add CLA action --- .github/workflows/cla-check.yml | 24 +++++ .github/workflows_tbd/behat_ui_pimcore.yml | 109 --------------------- CLA.md | 42 ++++++++ 3 files changed, 66 insertions(+), 109 deletions(-) create mode 100644 .github/workflows/cla-check.yml delete mode 100644 .github/workflows_tbd/behat_ui_pimcore.yml create mode 100644 CLA.md diff --git a/.github/workflows/cla-check.yml b/.github/workflows/cla-check.yml new file mode 100644 index 0000000000..03f91c9c4e --- /dev/null +++ b/.github/workflows/cla-check.yml @@ -0,0 +1,24 @@ +name: CLA Check +on: + issue_comment: + types: [created] + pull_request_target: + types: [opened, closed, synchronize] + +jobs: + CLAAssistant: + runs-on: ubuntu-latest + steps: + - name: "CLA Assistant" + if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' + uses: contributor-assistant/github-action@2.5.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_ACTION_ACCESS_TOKEN }} + with: + path-to-signatures: 'signatures/version1/cla.json' + path-to-document: 'https://github.com/cla-assistant/github-action/blob/master/SAPCLA.md' # e.g. a CLA or a DCO document + branch: "main" + allowlist: user1,bot* + remote-organization-name: "coreshop" + remote-repository-name: "cla" diff --git a/.github/workflows_tbd/behat_ui_pimcore.yml b/.github/workflows_tbd/behat_ui_pimcore.yml deleted file mode 100644 index 200d6a4c6c..0000000000 --- a/.github/workflows_tbd/behat_ui_pimcore.yml +++ /dev/null @@ -1,109 +0,0 @@ -name: Behat UI Pimcore -on: - push: - branches: [ 'master' ] - pull_request: - branches: [ 'master' ] - -jobs: - behat_ui_pimcore: - runs-on: ubuntu-latest - env: - APP_ENV: "test" - CORESHOP_TEST: 1 - PIMCORE_TEST_DB_DSN: "mysql://root:root@127.0.0.1:3306/coreshop_test" - PANTHER_EXTERNAL_BASE_URI: "http://localhost:9080/index_test.php" - PANTHER_CHROME_ARGUMENTS: "--disable-dev-shm-usage" - PANTHER_CHROME_DRIVER_BINARY: "/usr/bin/chromedriver" - PIMCORE_KERNEL_CLASS: 'Kernel' - - strategy: - matrix: - php: [ 8.0 ] - pimcore: [ 10.0.x-dev ] - database: [ 'mysql:8.0', 'percona:8.0', 'mariadb:10.3', 'mariadb:10.4', 'mariadb:10.5' ] - dependencies: [ highest, lowest ] - - services: - database: - image: "${{ matrix.database }}" - env: - MYSQL_ROOT_PASSWORD: root - MYSQL_DATABASE: coreshop_test - ports: - - 3306:3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - - name: "${{ matrix.pimcore }}, PHP ${{ matrix.php }}, DB ${{ matrix.database }}, Deps ${{ matrix.dependencies }}" - - steps: - - uses: actions/checkout@v2 - - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - ini-values: display_errors=On, display_startup_errors=On, error_reporting=32767 - extensions: intl, gd, simpleXML, dom, exif, fileinfo, iconv, mbstring, mysqli, pdo_mysql, zip, zlib - - - name: Check PHP Version - run: php -v - - - name: Verify MySQL connection - run: | - mysql --version - sudo apt-get install -y mysql-client - mysql --host 127.0.0.1 --port ${{ job.services.database.ports['3306'] }} -uroot -proot -e "SHOW DATABASES" - - - name: Composer Pimcore Version - run: | - composer req pimcore/pimcore:${{ matrix.pimcore }} --no-interaction --no-scripts --no-update - - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Cache composer dependencies - uses: actions/cache@v3 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-composer- - - - if: matrix.dependencies == 'highest' - name: Install dependencies highest - run: | - composer req pimcore/pimcore:${{ matrix.pimcore }} --no-interaction --no-scripts --no-update - composer update --no-progress --prefer-dist --optimize-autoloader - - - if: matrix.dependencies == 'lowest' - name: Install dependencies lowest - run: | - composer req pimcore/pimcore:${{ matrix.pimcore }} --no-interaction --no-scripts --no-update - composer update --no-progress --prefer-dist --optimize-autoloader --prefer-lowest - - - name: Cache clear - run: bin/console cache:clear - - - name: Assets Install - run: bin/console assets:install --symlink - - - name: Install Browser Drivers - run: vendor/bin/bdi detect drivers - - - name: Setup Symfony CLI - run: wget https://get.symfony.com/cli/installer -O - | bash - - - name: Run Symfony Webserver - run: ~/.symfony/bin/symfony server:start --port=9080 --dir=public --force-php-discovery --daemon - - - name: Run Behat - run: vendor/bin/behat --strict --no-interaction -vvv -f progress --config behat.yml.dist -p ui_pimcore - - - name: Upload Behat logs - uses: actions/upload-artifact@v2 - if: failure() - with: - name: "Behat logs (non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.pimcore }})" - path: etc/build/ - if-no-files-found: ignore diff --git a/CLA.md b/CLA.md new file mode 100644 index 0000000000..5d2d30d4d6 --- /dev/null +++ b/CLA.md @@ -0,0 +1,42 @@ +# Contributor License Agreement + +The following terms are used throughout this agreement: + +**You** - the person or legal entity including its affiliates asked to accept this agreement. An affiliate is any entity +that controls or is controlled by the legal entity, or is under common control with it. + +**Project** - is an umbrella term that refers to any and all coreshop open source projects. + +**Contribution** - any type of work that is submitted to a Project, including any modifications or additions to existing +work. + +Submitted - conveyed to a Project via a pull request, commit, issue, or any form of electronic, written, or verbal +communication with coreshop, contributors or maintainers. + +# 1. Grant of Copyright License. + +Subject to the terms and conditions of this agreement, You grant to the Projects’ maintainers, contributors, users and +to coreshop a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, +prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your contributions and such +derivative works. Except for this license, You reserve all rights, title, and interest in your contributions. + +# 2. Grant of Patent License. + +Subject to the terms and conditions of this agreement, You grant to the Projects’ maintainers, contributors, users and +to coreshop a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this +section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer your contributions, +where such license applies only to those patent claims licensable by you that are necessarily infringed by your +contribution or by combination of your contribution with the project to which this contribution was submitted. + +If any entity institutes patent litigation - including cross-claim or counterclaim in a lawsuit - against You alleging +that your contribution or any project it was submitted to constitutes or is responsible for direct or contributory +patent infringement, then any patent licenses granted to that entity under this agreement shall terminate as of the date +such litigation is filed. + +# 3. Source of Contribution. + +Your contribution is either your original creation, based upon previous work that, to the best of your knowledge, is +covered under an appropriate open source license and you have the right under that license to submit that work with +modifications, whether created in whole or in part by you, or you have clearly identified the source of the contribution +and any license or other restriction (like related patents, trademarks, and license agreements) of which you are +personally aware. \ No newline at end of file From c103c47ae31a3715f96581efd655ea2121fa86b5 Mon Sep 17 00:00:00 2001 From: Dominik Pfaffenbauer Date: Mon, 9 Sep 2024 14:57:39 +0200 Subject: [PATCH 2/6] add CLA action --- .github/workflows/cla-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cla-check.yml b/.github/workflows/cla-check.yml index 03f91c9c4e..9a4b7bc29f 100644 --- a/.github/workflows/cla-check.yml +++ b/.github/workflows/cla-check.yml @@ -11,7 +11,7 @@ jobs: steps: - name: "CLA Assistant" if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' - uses: contributor-assistant/github-action@2.5.0 + uses: contributor-assistant/github-action@2.5.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_ACTION_ACCESS_TOKEN }} From 7b827dda629eae8b710daf7f66ef085f013fd29f Mon Sep 17 00:00:00 2001 From: Dominik Pfaffenbauer Date: Mon, 9 Sep 2024 15:02:48 +0200 Subject: [PATCH 3/6] add CLA action --- .github/workflows/cla-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cla-check.yml b/.github/workflows/cla-check.yml index 9a4b7bc29f..3429e0967f 100644 --- a/.github/workflows/cla-check.yml +++ b/.github/workflows/cla-check.yml @@ -11,7 +11,7 @@ jobs: steps: - name: "CLA Assistant" if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' - uses: contributor-assistant/github-action@2.5.1 + uses: contributor-assistant/github-action@v2.5.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_ACTION_ACCESS_TOKEN }} From 9e11b924add01966f3d88c54b1d0f75ba36e272a Mon Sep 17 00:00:00 2001 From: Dominik Pfaffenbauer Date: Mon, 9 Sep 2024 15:06:30 +0200 Subject: [PATCH 4/6] [Tests] only run for certain paths --- .github/workflows/behat.yml | 12 ++++++++++++ .github/workflows/behat_ui.yml | 12 ++++++++++++ .github/workflows/gitsplit.yml | 3 +++ .github/workflows/packages_bundles.yml | 4 ++++ .github/workflows/packages_components.yml | 4 ++++ .github/workflows/static.yml | 16 ++++++++++++++++ crowdin.yml | 3 --- 7 files changed, 51 insertions(+), 3 deletions(-) delete mode 100644 crowdin.yml diff --git a/.github/workflows/behat.yml b/.github/workflows/behat.yml index b0e3d863c0..51082cdeab 100644 --- a/.github/workflows/behat.yml +++ b/.github/workflows/behat.yml @@ -2,8 +2,20 @@ name: Behat on: push: branches: [ '3.0', '3.1', '3.2' ] + paths: + - 'composer.json' + - 'features/**' + - 'behat.yml.dist' + - '*.php' + - 'src/**' pull_request: branches: [ '3.0', '3.1', '3.2' ] + paths: + - 'composer.json' + - 'features/**' + - 'behat.yml.dist' + - '*.php' + - 'src/**' release: types: [ created ] schedule: diff --git a/.github/workflows/behat_ui.yml b/.github/workflows/behat_ui.yml index 036ab483af..7bd9d54887 100644 --- a/.github/workflows/behat_ui.yml +++ b/.github/workflows/behat_ui.yml @@ -2,8 +2,20 @@ name: Behat UI on: push: branches: [ '3.0', '3.1', '3.2' ] + paths: + - 'composer.json' + - 'features/**' + - 'behat.yml.dist' + - '*.php' + - 'src/**' pull_request: branches: [ '3.0', '3.1', '3.2' ] + paths: + - 'composer.json' + - 'features/**' + - 'behat.yml.dist' + - '*.php' + - 'src/**' release: types: [ created ] schedule: diff --git a/.github/workflows/gitsplit.yml b/.github/workflows/gitsplit.yml index 6596563669..3355c94c4f 100644 --- a/.github/workflows/gitsplit.yml +++ b/.github/workflows/gitsplit.yml @@ -9,6 +9,9 @@ on: - 3.0 - 3.1 - 3.2 + paths: + - 'src/CoreShop/Bundle/**' + - 'src/CoreShop/Component/**' release: types: [ published ] diff --git a/.github/workflows/packages_bundles.yml b/.github/workflows/packages_bundles.yml index f8ef32cddd..1e12e9b9af 100644 --- a/.github/workflows/packages_bundles.yml +++ b/.github/workflows/packages_bundles.yml @@ -2,8 +2,12 @@ name: Packages Bundles on: push: branches: [ '3.0', '3.1', '3.2' ] + paths: + - 'src/CoreShop/Bundle/**' pull_request: branches: [ '3.0', '3.1', '3.2' ] + paths: + - 'src/CoreShop/Bundle/**' release: types: [ created ] schedule: diff --git a/.github/workflows/packages_components.yml b/.github/workflows/packages_components.yml index 7210abe029..73b4a7e694 100644 --- a/.github/workflows/packages_components.yml +++ b/.github/workflows/packages_components.yml @@ -2,8 +2,12 @@ name: Packages Components on: push: branches: [ '3.0', '3.1', '3.2' ] + paths: + - 'src/CoreShop/Component/**' pull_request: branches: [ '3.0', '3.1', '3.2' ] + paths: + - 'src/CoreShop/Component/**' release: types: [ created ] schedule: diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 6d29495e3a..731d7fd78f 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -2,8 +2,24 @@ name: Static Tests (Lint, Stan) on: push: branches: [ '3.0', '3.1', '3.2' ] + paths: + - 'features/**' + - 'behat.yml.dist' + - 'src/**' + - '*.php' + - '*.neon' + - '*.xml' + - 'composer.json' pull_request: branches: [ '3.0', '3.1', '3.2' ] + paths: + - 'features/**' + - 'behat.yml.dist' + - 'src/**' + - '*.php' + - '*.neon' + - '*.xml' + - 'composer.json' release: types: [ created ] schedule: diff --git a/crowdin.yml b/crowdin.yml deleted file mode 100644 index c98cda876b..0000000000 --- a/crowdin.yml +++ /dev/null @@ -1,3 +0,0 @@ -files: - - source: /src/CoreShop/**/translations/admin.en.yml - translation: /%original_path%/admin.%two_letters_code%.yml From e1c306d067c4d1a58f8c0a74324753a9c05d0a19 Mon Sep 17 00:00:00 2001 From: Dominik Pfaffenbauer Date: Mon, 9 Sep 2024 15:14:39 +0200 Subject: [PATCH 5/6] add CLA action --- .github/workflows/cla-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cla-check.yml b/.github/workflows/cla-check.yml index 3429e0967f..99d9c8f503 100644 --- a/.github/workflows/cla-check.yml +++ b/.github/workflows/cla-check.yml @@ -17,7 +17,7 @@ jobs: PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_ACTION_ACCESS_TOKEN }} with: path-to-signatures: 'signatures/version1/cla.json' - path-to-document: 'https://github.com/cla-assistant/github-action/blob/master/SAPCLA.md' # e.g. a CLA or a DCO document + path-to-document: 'https://github.com/coreshop/coreshop/blob/3.2/CLA.md' branch: "main" allowlist: user1,bot* remote-organization-name: "coreshop" From 36972ef89bba32ea7cb02f109e2c26539c6c8bf8 Mon Sep 17 00:00:00 2001 From: Dominik Pfaffenbauer Date: Mon, 9 Sep 2024 15:25:03 +0200 Subject: [PATCH 6/6] CLA permissions --- .github/workflows/cla-check.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/cla-check.yml b/.github/workflows/cla-check.yml index 99d9c8f503..10d373cd5e 100644 --- a/.github/workflows/cla-check.yml +++ b/.github/workflows/cla-check.yml @@ -5,6 +5,12 @@ on: pull_request_target: types: [opened, closed, synchronize] +permissions: + actions: write + contents: read + pull-requests: write + statuses: write + jobs: CLAAssistant: runs-on: ubuntu-latest