woocommerce-paypal-payments/.github/workflows/integration.yml
2026-04-07 18:00:23 +02:00

54 lines
1.7 KiB
YAML

name: Integration tests
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.4']
wc-versions: ['10.6.2']
name: PHP ${{ matrix.php-versions }} WC ${{ matrix.wc-versions }}
steps:
- uses: ddev/github-action-setup-ddev@1c7ef18595da42355373cb6d9417a6f44d758b93 # v1.10.1
with:
autostart: false
- uses: actions/checkout@v1
- name: Setup Composer Auth
env:
COMPOSER_AUTH_JSON: ${{ secrets.COMPOSER_AUTH_JSON }}
run: echo "$COMPOSER_AUTH_JSON" > auth.json
- name: Configure DDEV PHP
run: ddev config --php-version ${{ matrix.php-versions }}
- name: Configure DDEV WC
run: ddev config --web-environment-add="WC_VERSION=${{ matrix.wc-versions }}"
- name: Start DDEV
run: ddev start
- name: Orchestrate DDEV
run: ddev orchestrate -f
- name: Install WooCommerce Subscriptions
run: |
ddev composer config repositories.repo-name composer https://repo.packagist.com/inpsyde/payment-gateways/
ddev composer require inpsyde-mirror/woocommerce-subscriptions --no-interaction --no-scripts
ddev exec cp -r tests/qa/resources/plugins/woocommerce-subscriptions .ddev/wordpress/wp-content/plugins/woocommerce-subscriptions
ddev wp plugin activate woocommerce-subscriptions
- name: Cleanup Composer Auth
run: rm -f auth.json
- name: Create config
run: cp -n .env.integration.example .env.integration
- name: Setup tests
run: ddev php tests/integration/PHPUnit/setup.php
- name: Run PHPUnit
run: ddev exec phpunit --exclude skip-ci -c tests/integration/phpunit.xml.dist