NTR: prepare release (#437) #467
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: CI Pipeline | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '.github/**' | |
- '**.md' | |
- 'makefile' | |
jobs: | |
install: | |
name: Install Dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Code | |
uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
- name: Mount Dev Dependency Cache | |
uses: actions/cache@v3 | |
with: | |
key: cache-dev-dependencies-${{ github.run_id }} | |
path: | | |
vendor | |
node_modules | |
- name: Install Dependencies | |
run: make dev -B | |
# ------------------------------------------------------------------------------------------------------------------------ | |
jest: | |
name: Jest Tests | |
needs: install | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Code | |
uses: actions/checkout@v3 | |
- name: Mount Dev Dependency Cache | |
uses: actions/cache@v3 | |
with: | |
key: cache-dev-dependencies-${{ github.run_id }} | |
path: | | |
vendor | |
node_modules | |
- name: Run Jest | |
run: make jest -B | |
eslint: | |
name: ESLint | |
needs: install | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Code | |
uses: actions/checkout@v3 | |
- name: Mount Dev Dependency Cache | |
uses: actions/cache@v3 | |
with: | |
key: cache-dev-dependencies-${{ github.run_id }} | |
path: | | |
vendor | |
node_modules | |
- name: Run ESLint | |
run: make eslint -B | |
stylelint: | |
name: Stylelint | |
runs-on: ubuntu-latest | |
needs: install | |
steps: | |
- name: Clone Code | |
uses: actions/checkout@v3 | |
- name: Mount Dev Dependency Cache | |
uses: actions/cache@v3 | |
with: | |
key: cache-dev-dependencies-${{ github.run_id }} | |
path: | | |
vendor | |
node_modules | |
- name: Run Stylelint | |
run: make stylelint -B | |
# ------------------------------------------------------------------------------------------------------------------------ | |
php_checks: | |
name: PHP Syntax Checks | |
runs-on: ubuntu-latest | |
needs: install | |
steps: | |
- name: Clone Code | |
uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
- name: PHP Syntax Checks | |
run: make phpcheck -B | |
php_min: | |
name: PHP 5.6 Compatibility | |
needs: install | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Code | |
uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
- name: Mount Dev Dependency Cache | |
uses: actions/cache@v3 | |
with: | |
key: cache-dev-dependencies-${{ github.run_id }} | |
path: | | |
vendor | |
node_modules | |
- name: PHP Checks | |
run: make phpmin -B | |
# ------------------------------------------------------------------------------------------------------------------------ | |
unit_tests: | |
name: Unit Tests | |
needs: install | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Code | |
uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
- name: Mount Dev Dependency Cache | |
uses: actions/cache@v3 | |
with: | |
key: cache-dev-dependencies-${{ github.run_id }} | |
path: | | |
vendor | |
node_modules | |
- name: Run PHPUnit | |
run: make phpunit -B | |
# ------------------------------------------------------------------------------------------------------------------------ | |
phpstan: | |
name: PHPStan Analyser | |
needs: install | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Code | |
uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
- name: Mount Dev Dependency Cache | |
uses: actions/cache@v3 | |
with: | |
key: cache-dev-dependencies-${{ github.run_id }} | |
path: | | |
vendor | |
node_modules | |
- name: Run PHPStan | |
run: make stan -B | |
phpcsfixer: | |
name: PHP CS Fixer | |
needs: install | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Code | |
uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
- name: Mount Dev Dependency Cache | |
uses: actions/cache@v3 | |
with: | |
key: cache-dev-dependencies-${{ github.run_id }} | |
path: | | |
vendor | |
node_modules | |
- name: Run PHP CS Fixer | |
run: make csfix -B | |
snippets: | |
name: Validate Snippet Files | |
needs: install | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Code | |
uses: actions/checkout@v3 | |
- name: Mount Dev Dependency Cache | |
uses: actions/cache@v3 | |
with: | |
key: cache-dev-dependencies-${{ github.run_id }} | |
path: | | |
vendor | |
node_modules | |
- name: Snippet Tests | |
uses: ./.github/actions/run-snippets | |
with: | |
SHOPWARE: 5.7.15 | |
PHP: 7.4 | |
# ------------------------------------------------------------------------------------------------------------------------ | |
build: | |
name: Build Plugin | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Code | |
uses: actions/checkout@v3 | |
- name: Create Cache Directories | |
run: | | |
mkdir -p ~/.build | |
- name: Mount Build Cache | |
uses: actions/cache@v3 | |
with: | |
key: cache-plugin-${{ github.run_id }} | |
path: ~/.build | |
- name: Build Plugin | |
uses: ./.github/actions/build-plugin | |
with: | |
shopware: 5.7.15 | |
install_tests: | |
name: Install | Shopware ${{ matrix.shopware }} | |
needs: build | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
shopware: [ '5.7.0' ] | |
steps: | |
- name: Clone Code | |
uses: actions/checkout@v3 | |
- name: Mount Build Cache | |
uses: actions/cache@v3 | |
with: | |
key: cache-plugin-${{ github.run_id }} | |
path: ~/.build | |
- name: Installation Tests, Shopware ${{ matrix.shopware }} | |
uses: ./.github/actions/run-e2e | |
with: | |
# ------------------------------------------- | |
SHOPWARE: ${{ matrix.shopware }} | |
PHP: 7.4 | |
# ------------------------------------------- | |
MOLLIE_APIKEY_TEST: ${{ secrets.MOLLIE_APIKEY_TEST }} | |
# ------------------------------------------- | |
# only do installation tests without Cypress here | |
# this is just for old Shopware versions that do not | |
# support the API that we need for Cypress | |
RUN_CYPRESS: false | |
# ------------------------------------------------------------------------------------------------------------------------ | |
e2e: | |
name: E2E | Shopware ${{ matrix.shopware }}, PHP ${{ matrix.php }} | |
needs: build | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- shopware: '5.7.19' | |
php: '8.2' | |
- shopware: '5.7.18' | |
php: '8.2' | |
- shopware: '5.7.17' | |
php: '8.1' | |
- shopware: '5.7.16' | |
php: '8.1' | |
- shopware: '5.7.15' | |
php: '8.1' | |
- shopware: '5.7.14' | |
php: '8.1' | |
- shopware: '5.7.13' | |
php: '8.1' | |
- shopware: '5.7.11' | |
php: '8.1' | |
- shopware: '5.7.8' | |
php: '8.1' | |
- shopware: '5.7.7' | |
php: '8.1' | |
- shopware: '5.7.3' | |
php: '7.4' | |
- shopware: '5.6.10' | |
php: '7.4' | |
- shopware: '5.6.10' | |
php: '7.3' | |
- shopware: '5.6.9' | |
php: '7.2' | |
- shopware: '5.6.6' | |
php: '7.2' | |
- shopware: '5.6.4' | |
php: '7.2' | |
- shopware: '5.5.10' | |
php: '7.1' | |
- shopware: '5.3.0' | |
php: '5.6' | |
- shopware: '5.2.21' | |
php: '5.6' | |
steps: | |
- name: Clone Code | |
uses: actions/checkout@v3 | |
- name: Mount Build Cache | |
uses: actions/cache@v3 | |
with: | |
key: cache-plugin-${{ github.run_id }} | |
path: ~/.build | |
- name: E2E Tests, Shopware ${{ matrix.shopware }} | |
uses: ./.github/actions/run-e2e | |
with: | |
# ------------------------------------------- | |
SHOPWARE: ${{ matrix.shopware }} | |
PHP: ${{ matrix.php }} | |
# ------------------------------------------- | |
MOLLIE_APIKEY_TEST: ${{ secrets.MOLLIE_APIKEY_TEST }} | |
# ------------------------------------------- | |
RUN_CYPRESS: true | |
TESTRAIL: true | |
TESTRAIL_DOMAIN: ${{ secrets.TESTRAIL_DOMAIN }} | |
TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }} | |
TESTRAIL_PASSWORD: ${{ secrets.TESTRAIL_PASSWORD }} |