-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OXDEV-7728 Split codeception tests to groups in GHA
- Loading branch information
1 parent
4737525
commit fd4c8cd
Showing
13 changed files
with
259 additions
and
82 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,12 @@ | ||
# {{ $order := "01" }}order: {{ print $order }} | ||
# {{ $org := "oxid-esales" }}organisation: {{ print $org }} | ||
# {{ $name := "graphql-storefront" }}name: {{ print $name }} | ||
# {{ $group := "address" }}group: {{ print $group }} | ||
codeception: | ||
title: '{{ print $order }}-{{ print $name }}' | ||
configuration: '/var/www/vendor/{{ print $org }}/{{ print $name }}/tests/codeception.yml' | ||
additional_options: '--bootstrap=/var/www/source/bootstrap.php -g {{ print $group }}' | ||
output: | ||
prefix: 'codeception_artifacts_{{ print $group }}' | ||
logfile: | ||
prefix: 'codeception-{{ print $group }}' |
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,12 @@ | ||
# {{ $order := "02" }}order: {{ print $order }} | ||
# {{ $org := "oxid-esales" }}organisation: {{ print $org }} | ||
# {{ $name := "graphql-storefront" }}name: {{ print $name }} | ||
# {{ $group := "basket" }}group: {{ print $group }} | ||
codeception: | ||
title: '{{ print $order }}-{{ print $name }}' | ||
configuration: '/var/www/vendor/{{ print $org }}/{{ print $name }}/tests/codeception.yml' | ||
additional_options: '--bootstrap=/var/www/source/bootstrap.php -g {{ print $group }}' | ||
output: | ||
prefix: 'codeception_artifacts_{{ print $group }}' | ||
logfile: | ||
prefix: 'codeception-{{ print $group }}' |
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,12 @@ | ||
# {{ $order := "03" }}order: {{ print $order }} | ||
# {{ $org := "oxid-esales" }}organisation: {{ print $org }} | ||
# {{ $name := "graphql-storefront" }}name: {{ print $name }} | ||
# {{ $group := "customer" }}group: {{ print $group }} | ||
codeception: | ||
title: '{{ print $order }}-{{ print $name }}' | ||
configuration: '/var/www/vendor/{{ print $org }}/{{ print $name }}/tests/codeception.yml' | ||
additional_options: '--bootstrap=/var/www/source/bootstrap.php -g {{ print $group }}' | ||
output: | ||
prefix: 'codeception_artifacts_{{ print $group }}' | ||
logfile: | ||
prefix: 'codeception-{{ print $group }}' |
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,12 @@ | ||
# {{ $order := "04" }}order: {{ print $order }} | ||
# {{ $org := "oxid-esales" }}organisation: {{ print $org }} | ||
# {{ $name := "graphql-storefront" }}name: {{ print $name }} | ||
# {{ $group := "order" }}group: {{ print $group }} | ||
codeception: | ||
title: '{{ print $order }}-{{ print $name }}' | ||
configuration: '/var/www/vendor/{{ print $org }}/{{ print $name }}/tests/codeception.yml' | ||
additional_options: '--bootstrap=/var/www/source/bootstrap.php -g {{ print $group }}' | ||
output: | ||
prefix: 'codeception_artifacts_{{ print $group }}' | ||
logfile: | ||
prefix: 'codeception-{{ print $group }}' |
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,12 @@ | ||
# {{ $order := "05" }}order: {{ print $order }} | ||
# {{ $org := "oxid-esales" }}organisation: {{ print $org }} | ||
# {{ $name := "graphql-storefront" }}name: {{ print $name }} | ||
# {{ $group := "other" }}group: {{ print $group }} | ||
codeception: | ||
title: '{{ print $order }}-{{ print $name }}' | ||
configuration: '/var/www/vendor/{{ print $org }}/{{ print $name }}/tests/codeception.yml' | ||
additional_options: '--bootstrap=/var/www/source/bootstrap.php -g {{ print $group }}' | ||
output: | ||
prefix: 'codeception_artifacts_{{ print $group }}' | ||
logfile: | ||
prefix: 'codeception-{{ print $group }}' |
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,12 @@ | ||
# {{ $order := "06" }}order: {{ print $order }} | ||
# {{ $org := "oxid-esales" }}organisation: {{ print $org }} | ||
# {{ $name := "graphql-storefront" }}name: {{ print $name }} | ||
# {{ $group := "pricing" }}group: {{ print $group }} | ||
codeception: | ||
title: '{{ print $order }}-{{ print $name }}' | ||
configuration: '/var/www/vendor/{{ print $org }}/{{ print $name }}/tests/codeception.yml' | ||
additional_options: '--bootstrap=/var/www/source/bootstrap.php -g {{ print $group }}' | ||
output: | ||
prefix: 'codeception_artifacts_{{ print $group }}' | ||
logfile: | ||
prefix: 'codeception-{{ print $group }}' |
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.
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,122 @@ | ||
name: Manual trigger | ||
# Matrix workflow using re-usable github actions | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
scenario: | ||
type: choice | ||
options: | ||
- 7.1.x | ||
- 8.0.x | ||
- use custom testplan | ||
default: '7.1.x' | ||
description: 'Choose test scenario' | ||
limit: | ||
type: choice | ||
options: | ||
- 'no' | ||
- 'PHP8.1/MySQL5.7' | ||
- 'PHP8.1/MySQL8.0' | ||
- 'PHP8.2/MySQL5.7' | ||
- 'PHP8.2/MySQL8.0' | ||
- 'PHP8.3/MySQL5.7' | ||
- 'PHP8.3/MySQL8.0' | ||
default: 'PHP8.1/MySQL5.7' | ||
description: 'Limit to one PHP/MySQL combination' | ||
custom_testplan: | ||
type: string | ||
required: true | ||
description: 'URL/PATH of the testplan to run' | ||
default: '~/defaults/7.1.x.yml,~/graphql-storefront.yml' | ||
runs_on: | ||
type: string | ||
description: 'JSON string/array describing the runner' | ||
required: true | ||
default: '"ubuntu-latest"' | ||
use_dev_version: | ||
type: choice | ||
options: ['no', 'v0'] | ||
description: 'Use the dev version of github actions' | ||
default: 'no' | ||
|
||
jobs: | ||
build_testplan: | ||
runs-on: ${{ fromJson(inputs.runs_on) }} | ||
outputs: | ||
testplan: '${{ steps.build.outputs.testplan }}' | ||
steps: | ||
- name: 'Build testplan' | ||
id: build | ||
run: | | ||
# Build testplan | ||
# shellcheck disable=SC2088 # Tilde expansion happens in the workflow and not by bash | ||
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,' ;; | ||
"PHP8.3/MySQL5.7") LIMIT='~/defaults/php8.3_mysql5.7_only.yml,' ;; | ||
"PHP8.3/MySQL8.0") LIMIT='~/defaults/php8.3_mysql8.0_only.yml,' ;; | ||
*) echo "Illegal choice, fix the workflow" | ||
exit 1 | ||
;; | ||
esac | ||
case '${{ inputs.scenario}}' in | ||
"7.1.x") | ||
# shellcheck disable=SC2088 # Tilde expansion happens in the workflow and not by bash | ||
TESTPLAN="~/defaults/7.1.x.yml,${LIMIT}~/graphql-storefront.yml" | ||
;; | ||
"8.0.x") | ||
# shellcheck disable=SC2088 # Tilde expansion happens in the workflow and not by bash | ||
TESTPLAN="${LIMIT}~/graphql-storefront.yml" | ||
;; | ||
"use custom testplan") | ||
# shellcheck disable=SC2088 # Tilde expansion happens in the workflow and not by bash | ||
TESTPLAN="${{ inputs.custom_testplan }}" | ||
;; | ||
*) | ||
echo "Illegal choice, fix the workflow" | ||
exit 1 | ||
;; | ||
esac | ||
echo "testplan=${TESTPLAN}" | tee -a "${GITHUB_OUTPUT}" | ||
dispatch_stable: | ||
if: ${{ inputs.use_dev_version == 'no' }} | ||
needs: build_testplan | ||
uses: oxid-eSales/github-actions/.github/workflows/call-universal_test_workflow.yml@v4 | ||
with: | ||
testplan: ${{ needs.build_testplan.outputs.testplan }} | ||
runs_on: ${{ inputs.runs_on }} | ||
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 }} | ||
|
||
dispatch_v0: | ||
if: ${{ inputs.use_dev_version == 'v0' }} | ||
needs: build_testplan | ||
uses: oxid-eSales/github-actions/.github/workflows/call-universal_test_workflow.yml@v0 | ||
with: | ||
testplan: ${{ needs.build_testplan.outputs.testplan }} | ||
runs_on: ${{ inputs.runs_on }} | ||
defaults: 'v0' | ||
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 }} |
Oops, something went wrong.