Skip to content

Commit

Permalink
TC-47 test cypress
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniil Tkachev committed Dec 30, 2024
1 parent ec3a0e2 commit 80c4e94
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/universal_workflow_light.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1164,6 +1164,14 @@ jobs:
logfile: load_testplan_runscript.log
token: ${{ secrets.enterprise_github_token || github.token }}

- name: Set Cypress Variables
run: |

Check failure on line 1168 in .github/workflows/universal_workflow_light.yaml

View workflow job for this annotation

GitHub Actions / osc_telecash_php82_mysql_80 / actionlint

shellcheck reported issue in this script: SC2129:style:1:1: Consider using { cmd1; cmd2; } >> file instead of individual redirects

Check failure on line 1168 in .github/workflows/universal_workflow_light.yaml

View workflow job for this annotation

GitHub Actions / osc_telecash_php82_mysql_80 / actionlint

shellcheck reported issue in this script: SC2086:info:1:49: Double quote to prevent globbing and word splitting

Check failure on line 1168 in .github/workflows/universal_workflow_light.yaml

View workflow job for this annotation

GitHub Actions / osc_telecash_php82_mysql_80 / actionlint

shellcheck reported issue in this script: SC2086:info:2:40: Double quote to prevent globbing and word splitting

Check failure on line 1168 in .github/workflows/universal_workflow_light.yaml

View workflow job for this annotation

GitHub Actions / osc_telecash_php82_mysql_80 / actionlint

shellcheck reported issue in this script: SC2086:info:3:38: Double quote to prevent globbing and word splitting

Check failure on line 1168 in .github/workflows/universal_workflow_light.yaml

View workflow job for this annotation

GitHub Actions / osc_telecash_php82_mysql_80 / actionlint

shellcheck reported issue in this script: SC2086:info:4:38: Double quote to prevent globbing and word splitting

Check failure on line 1168 in .github/workflows/universal_workflow_light.yaml

View workflow job for this annotation

GitHub Actions / osc_telecash_php82_mysql_80 / actionlint

shellcheck reported issue in this script: SC2086:info:5:38: Double quote to prevent globbing and word splitting
echo "cypress_composer_transform=some_value" >> $GITHUB_ENV
echo "cypress_composer_early=false" >> $GITHUB_ENV
echo "cypress_container_name=php" >> $GITHUB_ENV
echo "cypress_container_options=" >> $GITHUB_ENV
echo "cypress_path=/var/www/html" >> $GITHUB_ENV
- name: Convert variables
id: cy
shell: bash
Expand Down Expand Up @@ -1226,14 +1234,6 @@ jobs:
sed -e 's#\-\-*#-#' -e 's#\_\_*#_#g' | \
tee -a "${GITHUB_OUTPUT}"
- name: Set Cypress Variables
run: |
echo "cypress_composer_transform=some_value" >> $GITHUB_ENV
echo "cypress_composer_early=false" >> $GITHUB_ENV
echo "cypress_container_name=php" >> $GITHUB_ENV
echo "cypress_container_options=" >> $GITHUB_ENV
echo "cypress_path=/var/www/html" >> $GITHUB_ENV
- name: Debug Outputs
run: |
echo "cypress_composer_transform: ${{ steps.cy.outputs.cypress_composer_transform }}"
Expand All @@ -1242,6 +1242,7 @@ jobs:
echo "cypress_container_options: ${{ steps.cy.outputs.cypress_container_options }}"
echo "cypress_path: ${{ steps.cy.outputs.cypress_path }}"
- name: 'Start shop'
uses: 'OXID-eSales/github-actions/start_shop@v4'
with:
Expand Down Expand Up @@ -1271,20 +1272,20 @@ jobs:
debug: ${{ needs.init.outputs.debug }}
github_token: ${{ secrets.enterprise_github_token || github.token }}


- name: Run composer if there is no transform
# Only run this if there is no transformation and composer_early is set to 'false'
if: ${{ steps.cy.outputs.cypress_composer_transform == '' && steps.cy.outputs.cypress_composer_early == 'false' }}
if: ${{ (steps.cy.outputs.cypress_composer_transform == '' || !steps.cy.outputs.cypress_composer_transform) && (steps.cy.outputs.cypress_composer_early == 'false' || !steps.cy.outputs.cypress_composer_early) }}
run: |
# run composer
${{ inputs.debug }}
docker compose exec -T \
${{ steps.cy.outputs.cypress_container_options }} \
${{ steps.cy.outputs.cypress_container_name }} \
${{ steps.cy.outputs.cypress_container_options || '--user=www-data' }} \
${{ steps.cy.outputs.cypress_container_name || 'php' }} \
composer config -g github-oauth.github.com "${{ secrets.enterprise_github_token || github.token }}"
docker compose exec -T \
${{ steps.cy.outputs.cypress_container_options }} \
${{ steps.cy.outputs.cypress_container_name }} \
composer update --no-interaction -d "/var/www/${{ steps.cy.outputs.cypress_path }}"
${{ steps.cy.outputs.cypress_container_options || '--user=www-data' }} \
${{ steps.cy.outputs.cypress_container_name || 'php' }} \
composer update --no-interaction -d "/var/www/${{ steps.cy.outputs.cypress_path || 'html' }}"
- name: Run custom scripts
uses: 'OXID-eSales/github-actions/run_custom_scripts@v4'
Expand Down

0 comments on commit 80c4e94

Please sign in to comment.