Skip to content

Commit 8fdd5e2

Browse files
committed
Switch to v5
1 parent 73802a3 commit 8fdd5e2

4 files changed

Lines changed: 49 additions & 55 deletions

File tree

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
install:
22
cache:
33
prepared_shop: false
4-
git:
5-
repository: 'OXID-eSales/module-template'
6-
ref: &ref '{{ .Github.RefName }}'
7-
shop_url: 'https://github.com/OXID-eSales/module-template.git'
8-
shop_ref: *ref
94
composer:
105
root_url: ''
116
transform: |
127
{
13-
"require": {
14-
"oxid-esales/oxideshop-ce": "{{ .Data.global.composer.dev_ref }}",
15-
"oxid-esales/twig-admin-theme": "{{ .Data.global.composer.dev_ref }}",
16-
"oxid-esales/apex-theme": "{{ .Data.global.composer.dev_ref }}",
17-
"oxid-esales/twig-component": "{{ .Data.global.composer.dev_ref }}"
18-
}
8+
"require": {
9+
"oxid-esales/apex-theme": "{{ .Data.install.composer.dev_ref }}",
10+
"oxid-esales/oxideshop-ce": "{{ .Data.install.composer.dev_ref }}",
11+
"oxid-esales/twig-admin-theme": "{{ .Data.install.composer.dev_ref }}",
12+
"oxid-esales/twig-component": "{{ .Data.install.composer.dev_ref }}"
13+
}
1914
}
2015
custom_script_container: |
2116
vendor/bin/oe-console oe:database:reset --db-host=mysql --db-port=3306 --db-name=example --db-user=root --db-password=root --force
@@ -24,44 +19,43 @@ install:
2419
vendor/bin/oe-console oe:module:activate oe_moduletemplate
2520
vendor/bin/oe-console oe:theme:activate apex
2621
27-
install_shop_with_modules:
28-
composer:
29-
root_url: ''
30-
3122
runscript: &runscript
3223
matrix:
3324
script: |
3425
[
35-
"module_template:tests-unit",
36-
"module_template:tests-integration",
37-
"module_template:tests-codeception"
26+
"report:tests-unit",
27+
"report:tests-integration",
28+
"no_report:tests-codeception",
3829
]
39-
module_template:
30+
report:
31+
path: ''
32+
no_report:
4033
path: ''
34+
coverage_prefix: ''
4135

4236
runslim:
4337
<<: *runscript
4438
matrix:
4539
script: |
4640
[
47-
"module_template:phpcs-report",
48-
"module_template:phpmd-report",
49-
"module_template:phpstan-report"
41+
"report:phpstan-report",
42+
"no_report:phpmd-report",
43+
"no_report:phpcs-report",
5044
]
5145
5246
sonarcloud:
5347
matrix:
5448
testplan: '["-"]'
5549
strip_path: '/var/www/'
56-
project_key: 'OXID-eSales_module-template'
57-
project_name: 'oxid-esales/module-template'
5850
organization: 'oxid-esales'
59-
parameters: |
60-
-Dsonar.language=php \
61-
-Dsonar.scm.provider=git \
62-
-Dsonar.sources=src \
63-
-Dsonar.tests=tests \
64-
-Dsonar.php.phpstan.reportPaths=coverage-reports/phpstan.report.json
51+
project_name: 'oxid-esales/module-template'
52+
project_key: 'OXID-eSales_module-template'
53+
target_branch: 'b-7.3.x'
54+
parameters: >
55+
-Dsonar.language=php
56+
-Dsonar.scm.provider=git
57+
-Dsonar.sources=src
58+
-Dsonar.tests=tests
6559
6660
finish:
67-
slack_title: 'Module template ({{ .Data.global.git.shop_ref }}) by {{ .Github.Actor }}'
61+
slack_title: 'Module template ({{ .Data.install.git.ref }}) by {{ .Github.Actor }}'

.github/workflows/dispatch_module.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Manual trigger
2-
# Matrix workflow using re-usable github actions
32

43
on:
54
workflow_dispatch:
@@ -11,10 +10,12 @@ on:
1110
- 'PHP8.2/MySQL8.0'
1211
- 'PHP8.2/MariaDB11'
1312
- 'PHP8.3/MySQL8.0'
13+
- 'PHP8.3/MySQL8.4'
1414
- 'PHP8.3/MariaDB11'
1515
- 'PHP8.4/MySQL8.0'
16+
- 'PHP8.4/MySQL8.4'
1617
- 'PHP8.4/MariaDb11'
17-
default: 'PHP8.2/MySQL8.0'
18+
default: 'PHP8.3/MySQL8.0'
1819
description: 'Limit to one PHP/MySQL combination'
1920
use_dev_version:
2021
type: choice
@@ -26,10 +27,10 @@ jobs:
2627
build_testplan:
2728
runs-on: ubuntu-latest
2829
outputs:
29-
testplan: '${{ steps.build.outputs.testplan }}'
30+
testplan: '${{ steps.build_testplan.outputs.testplan }}'
3031
steps:
3132
- name: 'Build testplan'
32-
id: build
33+
id: build_testplan
3334
run: |
3435
# Build testplan
3536
# shellcheck disable=SC2088
@@ -38,8 +39,10 @@ jobs:
3839
"PHP8.2/MySQL8.0") LIMIT='~/defaults/php8.2_mysql8.0_only.yaml,' ;;
3940
"PHP8.2/MariaDB11") LIMIT='~/defaults/php8.2_mariadb11_only.yaml,' ;;
4041
"PHP8.3/MySQL8.0") LIMIT='~/defaults/php8.3_mysql8.0_only.yaml,' ;;
42+
"PHP8.3/MySQL8.4") LIMIT='~/defaults/php8.3_mysql8.4_only.yaml,' ;;
4143
"PHP8.3/MariaDB11") LIMIT='~/defaults/php8.3_mariadb11_only.yaml,' ;;
4244
"PHP8.4/MySQL8.0") LIMIT='~/defaults/php8.4_mysql8.0_only.yaml,' ;;
45+
"PHP8.4/MySQL8.4") LIMIT='~/defaults/php8.4_mysql8.4_only.yaml,' ;;
4346
"PHP8.4/MariaDb11") LIMIT='~/defaults/php8.4_mariadb11_only.yaml,' ;;
4447
*) echo "Illegal choice, fix the workflow"
4548
exit 1
@@ -52,19 +55,18 @@ jobs:
5255
dispatch_stable:
5356
if: ${{ inputs.use_dev_version == 'no' }}
5457
needs: build_testplan
55-
uses: oxid-eSales/github-actions/.github/workflows/universal_workflow_light.yaml@v4
58+
uses: oxid-eSales/github-actions/.github/workflows/universal_workflow_light.yaml@v5
5659
with:
5760
testplan: ${{ needs.build_testplan.outputs.testplan }}
5861
runs_on: '"ubuntu-latest"'
59-
defaults: 'v4'
62+
defaults: 'v5'
6063
plan_folder: '.github/oxid-esales'
6164
secrets:
6265
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
6366
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
6467
CACHE_ENDPOINT: ${{ secrets.CACHE_ENDPOINT }}
6568
CACHE_ACCESS_KEY: ${{ secrets.CACHE_ACCESS_KEY }}
6669
CACHE_SECRET_KEY: ${{ secrets.CACHE_SECRET_KEY }}
67-
enterprise_github_token: ${{ secrets.enterprise_github_token }}
6870
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
6971
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
7072

@@ -83,6 +85,5 @@ jobs:
8385
CACHE_ENDPOINT: ${{ secrets.CACHE_ENDPOINT }}
8486
CACHE_ACCESS_KEY: ${{ secrets.CACHE_ACCESS_KEY }}
8587
CACHE_SECRET_KEY: ${{ secrets.CACHE_SECRET_KEY }}
86-
enterprise_github_token: ${{ secrets.enterprise_github_token }}
8788
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
8889
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

.github/workflows/scheduled.yaml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
name: Scheduled weekly run
2-
# Matrix workflow using re-usable github actions
32

43
on:
54
schedule:
65
# This cron job runs at 1:16 AM every 7th day of the month, every month of the year.
76
- cron: '16 1 */7 * *'
87

98
jobs:
10-
module_template_71x_nightly:
11-
if: always()
12-
uses: oxid-eSales/github-actions/.github/workflows/universal_workflow_light.yaml@v4
9+
matrix_73x_weekly:
10+
uses: oxid-eSales/github-actions/.github/workflows/universal_workflow_light.yaml@v5
1311
with:
14-
testplan: '~/defaults/7.3.x.yaml,~/defaults/scheduled.yaml,~/module-template.yaml'
12+
testplan: '~/defaults/7.3.x.yaml,~/defaults/scheduled.yaml,~/module-template.yaml,~/_custom.yaml'
1513
runs_on: '"ubuntu-latest"'
16-
defaults: 'v4'
14+
defaults: 'v5'
1715
plan_folder: '.github/oxid-esales'
18-
use_scheduled_slack_channel: true
16+
custom_testplan_yaml: |
17+
finish:
18+
slack_title: 'Matrix-73x-Weekly-{{ .Github.EventName }}-{{ .Github.RefName }}'
1919
secrets:
2020
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
2121
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
2222
CACHE_ENDPOINT: ${{ secrets.CACHE_ENDPOINT }}
2323
CACHE_ACCESS_KEY: ${{ secrets.CACHE_ACCESS_KEY }}
2424
CACHE_SECRET_KEY: ${{ secrets.CACHE_SECRET_KEY }}
25-
enterprise_github_token: ${{ secrets.enterprise_github_token }}
2625
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
2726
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
28-
SLACK_SCHEDULED_WEBHOOK_URL: ${{ secrets.SLACK_SCHEDULED_WEBHOOK_URL }}

.github/workflows/trigger.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
name: Auto trigger on push or pull requests
2-
# Matrix workflow using re-usable github actions
32

43
on:
54
pull_request: {}
65
push:
76
branches:
8-
- 'b-7.3.x*'
7+
- 'b-7.3.x**'
98

109
jobs:
11-
module_template_php82_mysql_80:
12-
uses: oxid-eSales/github-actions/.github/workflows/universal_workflow_light.yaml@v4
10+
php82_mysql80:
11+
uses: oxid-eSales/github-actions/.github/workflows/universal_workflow_light.yaml@v5
1312
with:
14-
testplan: '~/defaults/7.3.x.yaml,~/defaults/php8.2_mysql8.0_only.yaml,~/module-template.yaml'
13+
testplan: '~/defaults/7.3.x.yaml,~/defaults/php8.2_mysql8.0_only.yaml,~/module-template.yaml,~/_custom.yaml'
1514
runs_on: '"ubuntu-latest"'
16-
defaults: 'v4'
15+
defaults: 'v5'
1716
plan_folder: '.github/oxid-esales'
17+
custom_testplan_yaml: |
18+
finish:
19+
slack_title: 'PHP82-MySQL80-{{ .Github.EventName }}-{{ .Github.RefName }}'
1820
secrets:
1921
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
2022
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
2123
CACHE_ENDPOINT: ${{ secrets.CACHE_ENDPOINT }}
2224
CACHE_ACCESS_KEY: ${{ secrets.CACHE_ACCESS_KEY }}
2325
CACHE_SECRET_KEY: ${{ secrets.CACHE_SECRET_KEY }}
24-
enterprise_github_token: ${{ secrets.enterprise_github_token }}
2526
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
2627
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 commit comments

Comments
 (0)