mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-13 13:14:53 +00:00
ci: easy repo switching (#192)
This commit is contained in:
@@ -21,6 +21,9 @@ on:
|
|||||||
- "supported-version/**"
|
- "supported-version/**"
|
||||||
- "!(**/*.md)"
|
- "!(**/*.md)"
|
||||||
|
|
||||||
|
env:
|
||||||
|
MAGENTO_COMPOSER_REPO: "https://mirror.mage-os.org/"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
compute_matrix:
|
compute_matrix:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -49,3 +52,5 @@ jobs:
|
|||||||
magento_version: ${{ matrix.magento }}
|
magento_version: ${{ matrix.magento }}
|
||||||
package_name: mage-os/magento2-demo-package
|
package_name: mage-os/magento2-demo-package
|
||||||
source_folder: $GITHUB_WORKSPACE/_test/demo-package
|
source_folder: $GITHUB_WORKSPACE/_test/demo-package
|
||||||
|
composer_auth: ${{ secrets.COMPOSER_AUTH }}
|
||||||
|
magento_repository: ${{ env.MAGENTO_COMPOSER_REPO }}
|
||||||
@@ -42,3 +42,5 @@ jobs:
|
|||||||
matrix: ${{ needs.compute_matrix.outputs.matrix }}
|
matrix: ${{ needs.compute_matrix.outputs.matrix }}
|
||||||
test_command: ../../../vendor/bin/phpunit ../../../vendor/mage-os/magento2-demo-package/Test/Integration
|
test_command: ../../../vendor/bin/phpunit ../../../vendor/mage-os/magento2-demo-package/Test/Integration
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
secrets:
|
||||||
|
composer_auth: ${{ secrets.COMPOSER_AUTH }}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ on:
|
|||||||
env:
|
env:
|
||||||
PSEUDO_REPO_FOLDER: ../magento_repo
|
PSEUDO_REPO_FOLDER: ../magento_repo
|
||||||
magento_folder: ../magento2
|
magento_folder: ../magento2
|
||||||
|
MAGENTO_COMPOSER_REPO: "https://mirror.mage-os.org/"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
compute_matrix:
|
compute_matrix:
|
||||||
@@ -63,20 +64,26 @@ jobs:
|
|||||||
key: setup-magento-ci | ${{ runner.os }} | ${{ matrix.magento }}
|
key: setup-magento-ci | ${{ runner.os }} | ${{ matrix.magento }}
|
||||||
path: ${{ env.PSEUDO_STORE_FULL_PATH }}
|
path: ${{ env.PSEUDO_STORE_FULL_PATH }}
|
||||||
|
|
||||||
- run: composer create-project --repository-url="https://mirror.mage-os.org" "${{ matrix.magento }}" "${{ env.PSEUDO_REPO_FOLDER }}" --no-install
|
- run: composer create-project --repository-url="${{ env.MAGENTO_COMPOSER_REPO }}" "${{ matrix.magento }}" "${{ env.PSEUDO_REPO_FOLDER }}" --no-install
|
||||||
name: Create Store to simulate a real Magento store in a real repo.
|
name: Create Store to simulate a real Magento store in a real repo.
|
||||||
if: steps.setup-magento-store-cache.outputs.cache-hit != 'true'
|
if: steps.setup-magento-store-cache.outputs.cache-hit != 'true'
|
||||||
|
env:
|
||||||
|
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
|
||||||
|
|
||||||
- uses: ./fix-magento-install
|
- uses: ./fix-magento-install
|
||||||
name: Fix Magento Out of Box Install Issues
|
name: Fix Magento Out of Box Install Issues
|
||||||
with:
|
with:
|
||||||
magento_directory: ${{ env.PSEUDO_REPO_FOLDER }}
|
magento_directory: ${{ env.PSEUDO_REPO_FOLDER }}
|
||||||
if: steps.setup-magento-store-cache.outputs.cache-hit != 'true'
|
if: steps.setup-magento-store-cache.outputs.cache-hit != 'true'
|
||||||
|
env:
|
||||||
|
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
|
||||||
|
|
||||||
- run: composer install
|
- run: composer install
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: "${{ env.PSEUDO_REPO_FOLDER }}"
|
working-directory: "${{ env.PSEUDO_REPO_FOLDER }}"
|
||||||
if: steps.setup-magento-store-cache.outputs.cache-hit != 'true'
|
if: steps.setup-magento-store-cache.outputs.cache-hit != 'true'
|
||||||
|
env:
|
||||||
|
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
|
||||||
|
|
||||||
- run: git init && git config user.email "you@example.com" && git config user.name "Your Name" && git add . && git commit -m "init" && git clean -fdx
|
- run: git init && git config user.email "you@example.com" && git config user.name "Your Name" && git add . && git commit -m "init" && git clean -fdx
|
||||||
working-directory: "${{ env.PSEUDO_REPO_FOLDER }}"
|
working-directory: "${{ env.PSEUDO_REPO_FOLDER }}"
|
||||||
@@ -92,6 +99,7 @@ jobs:
|
|||||||
tools: composer:v${{ matrix.composer }}
|
tools: composer:v${{ matrix.composer }}
|
||||||
mode: store
|
mode: store
|
||||||
working-directory: ${{ env.magento_folder }}
|
working-directory: ${{ env.magento_folder }}
|
||||||
|
composer_auth: ${{ secrets.COMPOSER_AUTH }}
|
||||||
|
|
||||||
- uses: graycoreio/github-actions-magento2/cache-magento@main
|
- uses: graycoreio/github-actions-magento2/cache-magento@main
|
||||||
with:
|
with:
|
||||||
@@ -102,6 +110,8 @@ jobs:
|
|||||||
name: Composer install
|
name: Composer install
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||||
|
env:
|
||||||
|
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
|
||||||
|
|
||||||
setup-magento-extension:
|
setup-magento-extension:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -115,6 +125,8 @@ jobs:
|
|||||||
tools: composer:v2
|
tools: composer:v2
|
||||||
mode: extension
|
mode: extension
|
||||||
magento_version: magento/project-community-edition:2.4.5-p1
|
magento_version: magento/project-community-edition:2.4.5-p1
|
||||||
|
magento_repository: ${{ env.MAGENTO_COMPOSER_REPO }}
|
||||||
|
composer_auth: ${{ secrets.COMPOSER_AUTH }}
|
||||||
|
|
||||||
- uses: graycoreio/github-actions-magento2/cache-magento@main
|
- uses: graycoreio/github-actions-magento2/cache-magento@main
|
||||||
with:
|
with:
|
||||||
@@ -125,3 +137,5 @@ jobs:
|
|||||||
name: Composer install
|
name: Composer install
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||||
|
env:
|
||||||
|
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
|
||||||
|
|||||||
Reference in New Issue
Block a user