diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 01cdb4ec..900c3443 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,35 +6,11 @@ jobs: tests: runs-on: ubuntu-latest - services: - mysql: - image: mysql:5.7 - env: - MYSQL_ALLOW_EMPTY_PASSWORD: true - MYSQL_DATABASE: symfony_test - ports: - - 3306:3306 - options: >- - --health-cmd "mysqladmin ping" - --health-interval 10s - --health-timeout 5s - --health-retries 5 - strategy: matrix: - php: [7.0, 7.1, 7.2, 7.3, 7.4, 8.0] - symfony: [3.4, 4, 5] + php: [7.1, 7.2, 7.3, 7.4, 8.0] + symfony: [3.4, 4.4, 5] exclude: - - php: 7.3 - symfony: 3.4 - - php: 7.4 - symfony: 3.4 - - php: 8.0 - symfony: 3.4 - - php: 7.0 - symfony: 4 - - php: 7.0 - symfony: 5 - php: 7.1 symfony: 5 @@ -46,66 +22,71 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - extensions: pdo, mysql, sqlite + tools: composer:v2 + extensions: ctype, iconv, intl, json, mbstring, pdo, pdo_sqlite coverage: none - name: Checkout Symfony 3.4 Sample if: matrix.symfony == 3.4 uses: actions/checkout@v2 with: - repository: Naktibalda/codeception-symfony-tests - path: framework-tests + repository: Codeception/symfony-module-tests submodules: recursive + ref: 3.4 - - name: Checkout Symfony 4 Sample - if: matrix.symfony == 4 + - name: Checkout Symfony 4.4 Sample + if: matrix.symfony == 4.4 uses: actions/checkout@v2 with: - repository: Codeception/symfony-demo - path: framework-tests + repository: Codeception/symfony-module-tests + submodules: recursive + ref: 4.4 - name: Checkout Symfony 5 Sample if: matrix.symfony == 5 uses: actions/checkout@v2 with: - repository: Codeception/symfony-demo - path: framework-tests - ref: symfony5 + repository: Codeception/symfony-module-tests + submodules: recursive + ref: main + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache composer dependencies + uses: actions/cache@v2.1.3 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer- - name: Install Symfony Sample on PHP7 if: matrix.php < 8 - run: composer update --no-dev --prefer-dist --no-interaction - working-directory: framework-tests + run: composer update --no-progress - name: Install Symfony Sample on PHP8 if: matrix.php == 8.0 - run: composer update --no-dev --prefer-dist --no-interaction --ignore-platform-req=php - working-directory: framework-tests + run: composer update --no-progress --ignore-platform-req=php - - name: Validate composer.json and composer.lock - run: composer validate + - name: Yarn install + uses: borales/actions-yarn@v2.3.0 + with: + cmd: install - - name: Install dependencies - run: | - composer require "symfony/finder=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs - composer require "symfony/yaml=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs - composer require "symfony/console=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs - composer require "symfony/event-dispatcher=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs - composer require "symfony/css-selector=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs - composer require "symfony/dom-crawler=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs - composer require "symfony/browser-kit=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs - composer install --prefer-dist --no-progress --no-interaction --no-suggest - - - name: Database Symfony 3.4 - if: matrix.symfony == 3.4 - run: | - sed -i -e "s/%database_host%/127.0.0.1/g" app/config/config.yml - sed -i -e "s/%database_port%/3306/g" app/config/config.yml - sed -i -e "s/%database_name%/symfony_test/g" app/config/config.yml - sed -i -e "s/%database_user%/root/g" app/config/config.yml - sed -i -e "s/%database_password%//g" app/config/config.yml - php bin/console doctrine:schema:update --force -n - working-directory: framework-tests + - name: Yarn build + uses: borales/actions-yarn@v2.3.0 + with: + cmd: run encore production + + - name: Update database schema + run: php bin/console d:s:u -f + + - name: Load Doctrine fixtures + run: php bin/console d:f:l -q - name: Run test suite Symfony - run: php vendor/bin/codecept run functional -c framework-tests + run: php vendor/bin/codecept run Functional \ No newline at end of file
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: