Contract tests #553
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: Contract tests | |
on: | |
schedule: | |
- cron: "0 1 * * 6" # Run at 1am every Saturday | |
workflow_dispatch: ~ | |
pull_request: | |
paths: | |
- "tests/Contract/**" | |
push: | |
paths: | |
- "tests/Contract/**" | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
php: ["8.2"] | |
symfony: ["^6.4"] | |
sylius: ["~1.12.0", "~1.13.0"] | |
mysql: ["8.0"] | |
node: ["20.x"] | |
env: | |
APP_ENV: test | |
DATABASE_URL: "mysql://root:[email protected]/sylius?serverVersion=${{ matrix.mysql }}" | |
SAFERPAY_TEST_API_URL: "https://test.saferpay.com/api/" | |
SAFERPAY_TEST_API_USER: ${{ secrets.SAFERPAY_TEST_API_USER }} | |
SAFERPAY_TEST_API_PASSWORD: ${{ secrets.SAFERPAY_TEST_API_PASSWORD }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "${{ matrix.php }}" | |
extensions: intl | |
tools: flex,symfony | |
coverage: none | |
- name: Build test application | |
uses: SyliusLabs/[email protected] | |
with: | |
e2e: "yes" | |
e2e_js: "yes" | |
php_version: "${{ matrix.php }}" | |
symfony_version: "${{ matrix.symfony }}" | |
sylius_version: "${{ matrix.sylius }}" | |
database_version: "${{ matrix.mysql }}" | |
node_version: "${{ matrix.node }}" | |
build_type: "plugin" | |
- name: Run PHPUnit | |
run: vendor/bin/phpunit --colors=always --testsuite contract |