restore ci on pr #126
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
name: continuous-integration | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
concurrency: | |
group: 'continuous-integration' | |
cancel-in-progress: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
magento-version: [ '2.4.6' ] | |
env: | |
MAGENTO_MARKETPLACE_USERNAME: ${{ secrets.MAGENTO_MARKETPLACE_USERNAME }} | |
MAGENTO_MARKETPLACE_PASSWORD: ${{ secrets.MAGENTO_MARKETPLACE_PASSWORD }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 19 | |
registry-url: 'https://registry.npmjs.org' | |
cache: 'pnpm' | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
tools: composer:2 | |
php-version: 8.1 | |
coverage: none | |
- name: Setup Magento Repository Credentials | |
run: | | |
composer global config http-basic.repo.magento.com "${MAGENTO_MARKETPLACE_USERNAME}" "${MAGENTO_MARKETPLACE_PASSWORD}" | |
- name: Create Magento Project | |
run: | | |
composer create-project --no-install --repository-url=https://repo.magento.com/ magento/project-community-edition=${{ matrix.magento-version }} "$GITHUB_WORKSPACE/magento" | |
- name: Cache Magento Project | |
id: cache | |
uses: actions/cache@v2 | |
with: | |
path: ${{ github.workspace }}/magento | |
key: magento-${{ runner.os }}-${{ matrix.magento-version }} | |
- name: Install Composer Dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: composer install --ignore-platform-reqs --no-interaction | |
working-directory: ${{ github.workspace }}/magento | |
- name: Add config.php file to Magento | |
run: cp .github/_fixtures/config.php.dist "$GITHUB_WORKSPACE/magento/app/etc/config.php" | |
- run: pnpm i | |
- run: pnpm build | |
- run: pnpm test | |
env: | |
MAGEFRONT_TEST_MAGENTO_ROOT: ${{ github.workspace }}/magento |