Skip to content

Commit

Permalink
Merge branch 'main' into feature/cache-flush-time
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano authored Feb 8, 2024
2 parents 4f623e9 + c5b35aa commit b2f4a52
Show file tree
Hide file tree
Showing 87 changed files with 466 additions and 1,680 deletions.
18 changes: 18 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1427,6 +1427,24 @@
"contributions": [
"code"
]
},
{
"login": "massa-man",
"name": "Marcos Steverlynck",
"avatar_url": "https://avatars.githubusercontent.com/u/26821235?v=4",
"profile": "https://www.riseart.com/",
"contributions": [
"code"
]
},
{
"login": "ahudock",
"name": "Andy Hudock",
"avatar_url": "https://avatars.githubusercontent.com/u/33500977?v=4",
"profile": "https://github.com/ahudock",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7
Expand Down
24 changes: 19 additions & 5 deletions .ddev/commands/web/openmage-install
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ while :; do
shift
done

echo "Enable maintenance mode..."
touch maintenance.flag

LOCALXML="${ROOT}/app/etc/local.xml"
if [ -f "${LOCALXML}" ]; then
if [[ "${QUIET_INSTALL_FLAG}" ]]; then
Expand Down Expand Up @@ -67,7 +70,7 @@ fi

if [[ $INSTALL_SAMPLE_DATA =~ ^(yes|y) ]]; then
SAMPLE_DATA_URL=https://github.com/Vinai/compressed-magento-sample-data/raw/master/compressed-magento-sample-data-1.9.2.4.tgz
SAMPLE_DATA_DIRECTORY="${ROOT}/.sampleData"
SAMPLE_DATA_DIRECTORY="${ROOT}/.ddev/.sampleData"
SAMPLE_DATA_FILE=sample_data.tgz

if [[ ! -d "${SAMPLE_DATA_DIRECTORY}" ]]; then
Expand All @@ -85,15 +88,19 @@ if [[ $INSTALL_SAMPLE_DATA =~ ^(yes|y) ]]; then
tar xf "${SAMPLE_DATA_FILE}"

echo "Copying Sample Data into the OpenMage directory..."
cp -r magento-sample-data-1.9.2.4/* "${ROOT}/"
cp -r magento-sample-data-1.9.2.4/media/* "${ROOT}/media/"
cp -r magento-sample-data-1.9.2.4/skin/* "${ROOT}/skin/"

echo "Clearing var/cache..."
rm -rf "${ROOT}/var/cache/"*

echo "Importing Sample Data into the database..."
mysql -u db -h db db < "${SAMPLE_DATA_DIRECTORY}/magento-sample-data-1.9.2.4/magento_sample_data_for_1.9.2.4.sql"

# remove sample data
if [[ "${SAMPLE_DATA_KEEP_FLAG}" ]]; then
rm -rf $(
find . -maxdepth 1 -type f -name "*" ! -name "${SAMPLE_DATA_FILE}")
# shellcheck disable=SC2046
rm -rf magento-sample-data-1.9.2.4/
else
cd "${ROOT}" || exit
rm -rf "${SAMPLE_DATA_DIRECTORY}"
Expand All @@ -108,7 +115,11 @@ if [[ "${USE_DEFAULT_FLAG}" ]]; then
ADMIN_LASTNAME='Administrator'
ADMIN_EMAIL='admin@example.com'
ADMIN_PASSWORD='veryl0ngpassw0rd'
TABLE_PREFIX='om_'
if [[ "${SAMPLE_DATA_FLAG}" ]]; then
TABLE_PREFIX=''
else
TABLE_PREFIX='om_'
fi
else
read -r -p "Admin User [admin]: " ADMIN_USER
ADMIN_USER=${ADMIN_USER:-admin}
Expand Down Expand Up @@ -152,3 +163,6 @@ php -f install.php -- \
--default_currency 'USD' \
--enable_charts 'yes' \
--skip_url_validation 'yes'

echo "Disable maintenance mode..."
rm maintenance.flag
679 changes: 0 additions & 679 deletions .github/changelog/version_19.txt

This file was deleted.

357 changes: 0 additions & 357 deletions .github/changelog/version_20.txt

This file was deleted.

15 changes: 14 additions & 1 deletion .github/workflows/check-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
composer:
description: "Count changed Composer files"
value: ${{ jobs.check.outputs.composer }}
js:
description: "Count changed JS files"
value: ${{ jobs.check.outputs.js }}
php:
description: "Count changed PHP files"
value: ${{ jobs.check.outputs.php }}
Expand Down Expand Up @@ -42,6 +45,7 @@ jobs:
runs-on: [ubuntu-latest]
outputs:
composer: ${{ steps.changes-composer.outputs.composer }}
js: ${{ steps.changes-js.outputs.js }}
php: ${{ steps.changes-php.outputs.php }}
xml: ${{ steps.changes-xml.outputs.xml }}
workflow: ${{ steps.changes-workflow.outputs.workflow }}
Expand Down Expand Up @@ -78,6 +82,7 @@ jobs:
*.php
**/*.php
**/*.xml
**/*.js
.github/workflows/**
**phpcs**
**php-cs-fixer**
Expand All @@ -96,6 +101,14 @@ jobs:
echo "$count Composer file(s) changed"
echo "composer=$count" >> $GITHUB_OUTPUT
- name: Check if JS files changed
id: changes-js
if: steps.changed-files-specific.outputs.any_modified == 'true'
run: |
count="$(grep -oE "*.js" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)"
echo "$count JS file(s) changed"
echo "js=$count" >> $GITHUB_OUTPUT
- name: Check if PHP files changed
id: changes-php
if: steps.changed-files-specific.outputs.any_modified == 'true'
Expand Down Expand Up @@ -128,7 +141,7 @@ jobs:
echo "$count PHPCS file(s) changed"
echo "phpcs=$count" >> $GITHUB_OUTPUT
- name: Check if PHP-CS-Fixer files changed
- name: Check if PHP-CS-Fixer files changed
id: changes-php-cs-fixer
if: steps.changed-files-specific.outputs.any_modified == 'true'
run: |
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
name: "CodeQL"

on:
workflow_call:
workflow_dispatch:
push:
branches: [ "main", "v20", "v19" ]
branches: [ "main", "next", "v19" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main", "v20", "v19" ]
Expand Down Expand Up @@ -50,11 +52,11 @@ jobs:
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
Expand All @@ -63,7 +65,7 @@ jobs:
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.4', '8.2', '8.3']
php-versions: ['7.4', '8.3']

steps:
- name: Setup PHP
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

- name: Install OpenMage dependencies
working-directory: ./openmage
run: composer install --prefer-dist --no-progress --ignore-platform-reqs
run: composer install --prefer-dist --no-progress --ignore-platform-reqs --no-dev

- name: run phpUnit
run: bash ./run_unit_tests.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/syntax-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
php: ['7.4', '8.1', '8.2']
php: ['7.4', '8.3']

name: PHP Syntax ${{ matrix.php }}

Expand Down
23 changes: 17 additions & 6 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- 'composer.json'
- 'composer.lock'
- '**.php'
- '**.js'
- '**.xml'
- '.php-cs-fixer.dist.php'
- '.phpcs.xml.dist'
Expand All @@ -21,6 +22,7 @@ on:
- 'composer.json'
- 'composer.lock'
- '**.php'
- '**.js'
- '**.xml'
- '.php-cs-fixer.dist.php'
- '.phpcs.xml.dist'
Expand Down Expand Up @@ -51,8 +53,17 @@ jobs:
# needs.check.outputs.workflow > 0
uses: ./.github/workflows/composer.yml

code_ql:
name: Code-QL
needs: [check]
if: |
needs.check.outputs.js > 0 ||
needs.check.outputs.composer > 0 ||
needs.check.outputs.workflow > 0
uses: ./.github/workflows/codeql-analysis.yml

phpcs:
name: PHPCS
name: PHP CS
needs: [check, composer]
if: |
needs.check.outputs.php > 0 ||
Expand All @@ -62,7 +73,7 @@ jobs:
uses: ./.github/workflows/phpcs.yml

php-cs-fixer:
name: PHP-CS-Fixer
name: PHP CS Fixer
needs: [check, composer]
if: |
needs.check.outputs.php > 0 ||
Expand All @@ -84,21 +95,21 @@ jobs:
# DOES NOT run by default
# runs on schedule or when worklfow changed
syntax_php:
name: Syntax
name: PHP Syntax
needs: [check, phpcs, php-cs-fixer]
if: needs.check.outputs.workflow > 0
uses: ./.github/workflows/syntax-php.yml

syntax_xml:
name: Syntax
name: XML Syntax
needs: [check]
if: needs.check.outputs.xml > 0
uses: ./.github/workflows/syntax-xml.yml

# DOES NOT run by default
# runs on schedule or when worklfow or unit tests changed
sonar:
name: Sonar Unit Tests
name: Unit Tests (Sonar)
needs: [check, phpcs, php-cs-fixer]
if: |
needs.check.outputs.phpunit-test > 0 ||
Expand All @@ -110,7 +121,7 @@ jobs:
# DOES NOT run by default
# runs on schedule or when worklfow or unit tests changed
unit_tests:
name: OpenMage LTS - Unit Tests
name: Unit Tests (OpenMage)
needs: [check, sonar]
if: |
needs.check.outputs.phpunit-test > 0 ||
Expand Down
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@
# composer
/vendor

# ddev
.ddev/config.yaml

# scss-cache
/skin/*/*/*/scss/.sass-cache

Expand All @@ -80,3 +77,7 @@ phpstan*.neon
# dev scripts loaded via composer
/shell/update-copyright.php
/shell/translations.php

# DDEV
.ddev/config.yaml
.ddev/.sampleData
42 changes: 0 additions & 42 deletions LICENSE.html

This file was deleted.

Loading

0 comments on commit b2f4a52

Please sign in to comment.