-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OXDEV-7845 Run with light universal workflow
Signed-off-by: Anton Fedurtsya <[email protected]>
- Loading branch information
Showing
8 changed files
with
150 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# {{ $ids := "ddoemedialibrary" }}ids: {{ $ids }} | ||
# {{ $org := "oxid-esales" }}organisation: {{ $org }} | ||
# {{ $name := "media-library-module" }}name: {{ $name }} | ||
# {{ $repo := "OXID-eSales/media-library-module" }}repo: {{ $repo }} | ||
|
||
install_shop_with_modules: | ||
cache: | ||
prepared_shop: false | ||
composer: | ||
transform: | | ||
{ | ||
"require": { | ||
"oxid-esales/oxideshop-ce": "{{ .Data.global.composer.dev_ref }}", | ||
"oxid-esales/twig-component": "{{ .Data.global.composer.dev_ref }}", | ||
"oxid-esales/twig-admin-theme": "{{ .Data.global.composer.dev_ref }}", | ||
"oxid-esales/apex-theme": "{{ .Data.global.composer.dev_ref }}", | ||
"oxid-esales/developer-tools": "{{ .Data.global.composer.dev_ref }}", | ||
"{{ $org }}/{{ $name }}": "dev-{{ .Github.RefName }}" | ||
}, | ||
"repositories": { | ||
"{{ $org }}/{{ $name }}": { | ||
"type": "git", | ||
"url": "https://github.com/{{ $repo }}.git" | ||
}, | ||
"oxid-esales/developer-tools": { | ||
"type": "git", | ||
"url": "https://github.com/OXID-eSales/developer-tools.git" | ||
} | ||
} | ||
} | ||
custom_script_container: | | ||
vendor/bin/oe-console oe:database:reset --db-host=mysql --db-port=3306 --db-name=example --db-user=root --db-password=root --force | ||
vendor/bin/oe-console oe:module:activate "{{ $ids }}" | ||
vendor/bin/oe-console oe:theme:activate apex | ||
runscript: &runscript | ||
matrix: | ||
script: | | ||
[ | ||
"medialibrary:tests-unit", | ||
"medialibrary:tests-integration" | ||
] | ||
medialibrary: | ||
path: 'vendor/{{ $org}}/{{ $name }}' | ||
|
||
runslim: | ||
<<: *runscript | ||
matrix: | ||
script: | | ||
[ | ||
"medialibrary:phpstan", | ||
"medialibrary:phpcs", | ||
] | ||
sonarcloud: | ||
matrix: | ||
testplan: '["-"]' | ||
strip_path: '/var/www/vendor/{{ print $org }}/{{ print $name}}/' | ||
project_key: 'OXID-eSales_{{ print $name }}' | ||
project_name: '{{ $org}}/{{ $name }}' | ||
parameters: | | ||
-Dsonar.language=php | ||
-Dsonar.scm.provider=git | ||
-Dsonar.sources=src | ||
-Dsonar.tests=tests | ||
-Donar.php.phpstan.reportPaths=coverage-reports/phpstan.report.json | ||
finish: | ||
slack_title: '{{ print $name }} ({{ .Data.global.git.shop_ref }}) by {{ .Github.Actor }}' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,54 @@ | ||
name: Manual stable trigger | ||
# Matrix workflow using re-usable github actions | ||
name: Manual trigger | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
testplan: | ||
type: string | ||
required: true | ||
description: 'URL/PATH of the testplan to run' | ||
default: 'tests/github_actions/defaults/7.1.x.yml,tests/github_actions/module-medialibrary.yml' | ||
runs_on: | ||
type: string | ||
description: 'JSON string/array describing the runner' | ||
required: true | ||
default: '"ubuntu-latest"' | ||
limit: | ||
type: choice | ||
options: | ||
- 'no' | ||
- 'PHP8.1/MySQL5.7' | ||
- 'PHP8.1/MySQL8.0' | ||
- 'PHP8.2/MySQL5.7' | ||
- 'PHP8.2/MySQL8.0' | ||
default: 'PHP8.1/MySQL8.0' | ||
description: 'Limit to one PHP/MySQL combination' | ||
|
||
jobs: | ||
call_matrix: | ||
uses: oxid-eSales/github-actions/.github/workflows/call-universal_test_workflow.yml@v3 | ||
build_testplan: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
testplan: '${{ steps.build_testplan.outputs.testplan }}' | ||
steps: | ||
- name: Build testplan construct | ||
id: build_testplan | ||
run: | | ||
# shellcheck disable=SC2088 | ||
case "${{ inputs.limit }}" in | ||
"no") LIMIT='';; | ||
"PHP8.1/MySQL5.7") LIMIT='~/defaults/php8.1_mysql5.7_only.yml,' ;; | ||
"PHP8.1/MySQL8.0") LIMIT='~/defaults/php8.1_mysql8.0_only.yml,' ;; | ||
"PHP8.2/MySQL5.7") LIMIT='~/defaults/php8.2_mysql5.7_only.yml,' ;; | ||
"PHP8.2/MySQL8.0") LIMIT='~/defaults/php8.2_mysql8.0_only.yml,' ;; | ||
esac | ||
# shellcheck disable=SC2088 | ||
TESTPLAN="~/defaults/7.1.x.yml,${LIMIT}~/module-medialibrary.yml,~/_custom.yml" | ||
echo "testplan=${TESTPLAN}" | tee -a "${GITHUB_OUTPUT}" | ||
dispatch_stable: | ||
needs: build_testplan | ||
uses: oxid-eSales/github-actions/.github/workflows/universal_workflow_light.yml@v4 | ||
with: | ||
testplan: ${{ inputs.testplan }} | ||
runs_on: ${{ inputs.runs_on }} | ||
defaults: 'v3' | ||
testplan: ${{ needs.build_testplan.outputs.testplan }} | ||
runs_on: '"ubuntu-latest"' | ||
defaults: 'v4' | ||
plan_folder: '.github/oxid-esales' | ||
secrets: | ||
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} | ||
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} | ||
CACHE_ENDPOINT: ${{ secrets.CACHE_ENDPOINT }} | ||
CACHE_ACCESS_KEY: ${{ secrets.CACHE_ACCESS_KEY }} | ||
CACHE_SECRET_KEY: ${{ secrets.CACHE_SECRET_KEY }} | ||
enterprise_github_token: ${{ secrets.enterprise_github_token }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
19 changes: 11 additions & 8 deletions
19
.github/workflows/push_module_71x.yml → .github/workflows/schedule.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Auto trigger on push or pull requests | ||
# Matrix workflow using re-usable github actions | ||
|
||
on: | ||
pull_request: {} | ||
push: {} | ||
|
||
jobs: | ||
php81_mysql80: | ||
uses: oxid-eSales/github-actions/.github/workflows/universal_workflow_light.yml@v4 | ||
with: | ||
testplan: '~/defaults/7.1.x.yml,~/defaults/php8.1_mysql8.0_only.yml,~/module-medialibrary.yml,~/_custom.yml' | ||
runs_on: '"ubuntu-latest"' | ||
defaults: 'v4' | ||
plan_folder: '.github/oxid-esales' | ||
custom_testplan_yaml: | | ||
global: | ||
title: 'php81_mysql80-{{ .Github.EventName }}-{{ .Github.RefName }}' | ||
secrets: | ||
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} | ||
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} | ||
CACHE_ENDPOINT: ${{ secrets.CACHE_ENDPOINT }} | ||
CACHE_ACCESS_KEY: ${{ secrets.CACHE_ACCESS_KEY }} | ||
CACHE_SECRET_KEY: ${{ secrets.CACHE_SECRET_KEY }} | ||
enterprise_github_token: ${{ secrets.enterprise_github_token }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.