Merge pull request #129 from p-maguire/10.2.x #31
This file contains hidden or 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: Test | |
| on: [push, pull_request] | |
| env: | |
| NODE_VERSION: 18 | |
| MODULE_NAME: Bitpay_BPCheckout | |
| COMPOSER_NAME: "bitpay/module-bpcheckout" | |
| jobs: | |
| unit-tests-81: | |
| name: Unit Tests (PHP 8.1) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| MAGENTO_VERSION: ["2.4.4", "2.4.5", "2.4.6"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: extdn/github-actions-m2/magento-unit-tests/8.1@master | |
| env: | |
| MAGENTO_VERSION: ${{ matrix.MAGENTO_VERSION }} | |
| unit-tests-82: | |
| name: Unit Tests (PHP 8.2) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| MAGENTO_VERSION: ["2.4.6", "2.4.7", "2.4.8"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: extdn/github-actions-m2/magento-unit-tests/8.2@master | |
| with: | |
| magento_pre_install_script: "./.github/2.4.8/test-pre-install-script.sh" | |
| env: | |
| PHPUNIT_FILE: ".github/2.4.8/phpunit.xml" | |
| MAGENTO_MARKETPLACE_USERNAME: ${{ secrets.MAGENTO_MARKETPLACE_USERNAME }} | |
| MAGENTO_MARKETPLACE_PASSWORD: ${{ secrets.MAGENTO_MARKETPLACE_PASSWORD }} | |
| MAGENTO_VERSION: ${{ matrix.MAGENTO_VERSION }} | |
| unit-tests-83: | |
| name: Unit Tests (PHP 8.3) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| MAGENTO_VERSION: ["2.4.7", "2.4.8"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: extdn/github-actions-m2/magento-unit-tests/8.3@master | |
| with: | |
| magento_pre_install_script: "./.github/2.4.8/test-pre-install-script.sh" | |
| env: | |
| PHPUNIT_FILE: ".github/2.4.8/phpunit.xml" | |
| MAGENTO_MARKETPLACE_USERNAME: ${{ secrets.MAGENTO_MARKETPLACE_USERNAME }} | |
| MAGENTO_MARKETPLACE_PASSWORD: ${{ secrets.MAGENTO_MARKETPLACE_PASSWORD }} | |
| MAGENTO_VERSION: ${{ matrix.MAGENTO_VERSION }} | |
| unit-tests-84: | |
| name: Unit Tests (PHP 8.4) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| MAGENTO_VERSION: ["2.4.8"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build docker image | |
| run: docker build -f .github/2.4.8/php-8.4/Dockerfile -t local . | |
| - name: Run docker image | |
| run: docker run -e GITHUB_WORKSPACE=$GITHUB_WORKSPACE -e MODULE_NAME=$MODULE_NAME -e MODULE_SOURCE=$MODULE_SOURCE -e COMPOSER_NAME=$COMPOSER_NAME -e MAGENTO_VERSION=$MAGENTO_VERSION -e PROJECT_NAME=$PROJECT_NAME -e PHPUNIT_FILE=$PHPUNIT_FILE -e MAGENTO_MARKETPLACE_USERNAME=$MAGENTO_MARKETPLACE_USERNAME -e MAGENTO_MARKETPLACE_PASSWORD=$MAGENTO_MARKETPLACE_PASSWORD local | |
| env: | |
| PHPUNIT_FILE: ".github/2.4.8/phpunit.xml" | |
| MAGENTO_MARKETPLACE_USERNAME: ${{ secrets.MAGENTO_MARKETPLACE_USERNAME }} | |
| MAGENTO_MARKETPLACE_PASSWORD: ${{ secrets.MAGENTO_MARKETPLACE_PASSWORD }} | |
| MAGENTO_VERSION: ${{ matrix.MAGENTO_VERSION }} | |
| GITHUB_WORKSPACE: ${{ github.workspace }} | |
| lint: | |
| name: ESLint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Run linter | |
| run: | | |
| composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true | |
| composer require magento/magento-coding-standard --dev | |
| cd vendor/magento/magento-coding-standard | |
| npm install | |
| cd ../../../ | |
| ./vendor/magento/magento-coding-standard/node_modules/.bin/eslint -c ./vendor/magento/magento-coding-standard/eslint/eslint.config.mjs -- ./view |