Update cache config to match the new requirements #201
Workflow file for this run
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: PHP Mexico Pipeline | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| max-parallel: 1 | |
| matrix: | |
| php-version: ["7.3"] | |
| node-version: [12.x] | |
| services: | |
| mysql: | |
| image: mysql:5.7 | |
| env: | |
| MYSQL_ROOT_PASSWORD: toor | |
| MYSQL_DATABASE: phpmx | |
| MYSQL_USER: phpmx | |
| MYSQL_PASSWORD: phpmxtoor | |
| ports: | |
| - 3306 | |
| options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Use PHP ${{ matrix.php-version }} | |
| uses: shivammathur/setup-php@2.9.0 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v1 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: install dependencies | |
| run: yarn --frozen-lockfile | |
| - name: Build assets | |
| run: yarn build | |
| - name: Start mysql service | |
| run: sudo /etc/init.d/mysql start | |
| - name: Validate composer.json and composer.lock | |
| run: composer validate | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress --no-suggest | |
| - name: migrations | |
| run: ./bin/console doctrine:migration:migrate --no-interaction --env=test | |
| env: | |
| DATABASE_URL: mysql://root:toor@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/phpmx | |
| - name: php code style | |
| run: ./vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run | |
| - name: run test | |
| run: ./bin/phpunit | |
| env: | |
| DATABASE_URL: mysql://root:toor@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/phpmx | |
| # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit" | |
| # Docs: https://getcomposer.org/doc/articles/scripts.md | |
| # - name: Run test suite | |
| # run: composer run-script test |