Skip to content

Commit b4b7a83

Browse files
committed
fix: CI-Workflows modernisiert (PHP 8.4, actions v4, --no-scripts, git apply entfernt)
1 parent a628d3c commit b4b7a83

3 files changed

Lines changed: 31 additions & 38 deletions

File tree

.github/workflows/cs-fixer.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,19 @@ jobs:
1313
cs-fixer:
1414

1515
runs-on: ubuntu-latest
16-
permissions:
17-
contents: write # for Git to git apply
1816

1917
steps:
20-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
2119

2220
- name: Setup PHP
2321
uses: shivammathur/setup-php@v2
2422
with:
25-
php-version: '8.2'
26-
extensions: gd, intl, pdo_mysql
27-
coverage: none # disable xdebug, pcov
23+
php-version: '8.4'
24+
extensions: gd, intl
25+
coverage: none
2826

29-
# install dependencies from composer.json
30-
- name: Install test dependencies
31-
env:
32-
COMPOSER: composer.json
33-
run: composer install --prefer-dist --no-progress
27+
- name: Install dependencies
28+
run: composer install --prefer-dist --no-progress --no-scripts
3429

35-
# run php-cs-fixer, fix code styles
3630
- name: Run PHP CS Fixer
3731
run: composer cs-dry

.github/workflows/e2e.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,16 @@ jobs:
1313
e2e:
1414

1515
runs-on: ubuntu-latest
16-
permissions:
17-
contents: write # for Git to git apply
1816

1917
steps:
20-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
2119

2220
- name: Setup PHP
2321
uses: shivammathur/setup-php@v2
2422
with:
25-
php-version: '8.2'
23+
php-version: '8.4'
2624
extensions: gd, intl, pdo_mysql
27-
coverage: none # disable xdebug, pcov
25+
coverage: none
2826

2927
# credits https://blog.markvincze.com/download-artifacts-from-a-latest-github-release-in-sh-and-powershell/
3028
- name: Download latest REDAXO release
@@ -40,11 +38,16 @@ jobs:
4038
run: |
4139
sudo /etc/init.d/mysql start
4240
mysql -uroot -h127.0.0.1 -proot -e 'create database redaxo5;'
43-
git apply .github/workflows/default.config.yml.github-action.diff
4441
4542
- name: Setup REDAXO
4643
run: |
47-
php redaxo_cms/redaxo/bin/console setup:run -n --lang=de_de --agree-license --db-password=root --db-createdb=no --db-setup=normal --admin-username=admin --admin-password=adminpassword --error-email=test@redaxo.invalid --ansi
44+
php redaxo_cms/redaxo/bin/console setup:run -n --lang=de_de --agree-license \
45+
--db-host=127.0.0.1 --db-name=redaxo5 --db-password=root \
46+
--db-createdb=no --db-setup=normal \
47+
--admin-username=admin --admin-password=adminpassword \
48+
--error-email=test@redaxo.invalid --ansi
49+
php redaxo_cms/redaxo/bin/console config:set --type boolean debug.enabled true
50+
php redaxo_cms/redaxo/bin/console config:set --type boolean debug.throw_always_exception true
4851
4952
- name: Create user, update config
5053
run: |
@@ -63,7 +66,7 @@ jobs:
6366
redaxo_cms/redaxo/bin/console package:install '${{ github.event.repository.name }}'
6467
6568
- name: Setup nodejs
66-
uses: actions/setup-node@v3
69+
uses: actions/setup-node@v4
6770
with:
6871
node-version: "20.x"
6972
cache: 'npm'

.github/workflows/phpunit.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,17 @@ jobs:
1313
phpunit:
1414

1515
runs-on: ubuntu-latest
16-
permissions:
17-
contents: write # for Git to git apply
1816

1917
steps:
20-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
2119

2220
- name: Setup PHP
2321
uses: shivammathur/setup-php@v2
2422
with:
25-
php-version: '8.2'
23+
php-version: '8.4'
2624
extensions: gd, intl, pdo_mysql
27-
coverage: none # disable xdebug, pcov
25+
coverage: none
2826

29-
# credits https://blog.markvincze.com/download-artifacts-from-a-latest-github-release-in-sh-and-powershell/
3027
- name: Download latest REDAXO release
3128
run: |
3229
LATEST_RELEASE=$(curl -L -s -H 'Accept: application/json' https://github.com/redaxo/redaxo/releases/latest)
@@ -38,30 +35,29 @@ jobs:
3835
3936
- name: Init database
4037
run: |
41-
sudo /etc/init.d/mysql start
42-
mysql -uroot -h127.0.0.1 -proot -e 'create database redaxo5;'
38+
sudo /etc/init.d/mysql start
39+
mysql -uroot -h127.0.0.1 -proot -e 'create database redaxo5;'
4340
4441
- name: Setup REDAXO
4542
run: |
46-
php redaxo_cms/redaxo/bin/console setup:run -n --lang=de_de --agree-license --db-host=127.0.0.1 --db-name=redaxo5 --db-password=root --db-createdb=no --db-setup=normal --admin-username=admin --admin-password=adminpassword --error-email=test@redaxo.invalid --ansi
43+
php redaxo_cms/redaxo/bin/console setup:run -n --lang=de_de --agree-license \
44+
--db-host=127.0.0.1 --db-name=redaxo5 --db-password=root \
45+
--db-createdb=no --db-setup=normal \
46+
--admin-username=admin --admin-password=adminpassword \
47+
--error-email=test@redaxo.invalid --ansi
4748
php redaxo_cms/redaxo/bin/console config:set --type boolean debug.enabled true
4849
php redaxo_cms/redaxo/bin/console config:set --type boolean debug.throw_always_exception true
4950
50-
# copy Addon files, ignore some directories...
51-
# install phpmailer
52-
# install the addon
53-
# if the addon name does not match the repository name, ${{ github.event.repository.name }} must be replaced with the addon name
54-
- name: Copy and install Addons
51+
- name: Copy and install Addon
5552
run: |
56-
rsync -av --exclude='vendor' --exclude='.github' --exclude='.git' --exclude='redaxo_cms' './' 'redaxo_cms/redaxo/src/addons/${{ github.event.repository.name }}'
53+
rsync -av --exclude='vendor' --exclude='.github' --exclude='.git' --exclude='redaxo_cms' \
54+
'./' 'redaxo_cms/redaxo/src/addons/${{ github.event.repository.name }}'
5755
redaxo_cms/redaxo/bin/console package:install 'phpmailer'
5856
redaxo_cms/redaxo/bin/console package:install '${{ github.event.repository.name }}'
5957
6058
- name: Install test dependencies
6159
working-directory: redaxo_cms/redaxo/src/addons/${{ github.event.repository.name }}
62-
env:
63-
COMPOSER: composer.json
64-
run: composer install --prefer-dist --no-progress
60+
run: composer install --prefer-dist --no-progress --no-scripts
6561

6662
- name: Setup Problem Matchers for PHPUnit
6763
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

0 commit comments

Comments
 (0)