Force refresh GitHub contributor list #11
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: Cypress Tests | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: [ubuntu-latest] | |
| php: [7.4] | |
| machines: [1, 2] | |
| name: P${{ matrix.php }} - ${{ matrix.os }} - M${{ matrix.machines }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Copy ENV Laravel Configuration for CI | |
| run: php -r "file_exists('.env') || copy('.env.cypress.example', '.env');" | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.composer/cache/files | |
| key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo | |
| coverage: none | |
| - name: Install dependencies | |
| run: | | |
| composer install | |
| - name: Generate key | |
| run: php artisan key:generate | |
| - name: Create database and run migrations | |
| run: | | |
| sudo /etc/init.d/mysql start | |
| mysql -u root -proot -e 'CREATE DATABASE IF NOT EXISTS shark;' | |
| php artisan migrate:refresh --seed | |
| - name: Copy Cypress configs | |
| run: php -r "file_exists('cypress.json') || copy('cypress.json.example', 'cypress.json');" | |
| - name: Cypress run | |
| uses: cypress-io/github-action@v2 | |
| env: | |
| CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
| CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} | |
| with: | |
| record: true | |
| parallel: true | |
| group: Parallel on ${{ matrix.os }} - ${{ matrix.php }} | |
| build: npm run production | |
| start: php artisan serve --host 0.0.0.0 --port 8000 | |
| wait-on: http://localhost:8000 |