Mobile app preparations - prototyping #1356
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: Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| env: | |
| DATABASE_URL: postgresql://postgres:postgres@postgres:5432/speedpuzzling_test?serverVersion=16&charset=utf8 | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| container: ghcr.io/myspeedpuzzling/web-base-php85:main | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: vendor | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer- | |
| - uses: actions/cache@v4 | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm- | |
| - run: composer install --no-scripts --no-progress | |
| - run: npm install | |
| - run: npm run dev | |
| - run: vendor/bin/phpunit --testsuite "Project Test Suite" | |
| panther-tests: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: speedpuzzling | |
| options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| env: | |
| DATABASE_URL: postgresql://postgres:postgres@localhost:5432/speedpuzzling?serverVersion=16&charset=utf8 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: vendor | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer- | |
| - uses: actions/cache@v4 | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm- | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.5' | |
| extensions: pdo_pgsql, intl, redis, imagick, uuid | |
| - run: composer install --no-scripts --no-progress | |
| - run: npm install | |
| - run: npm run dev | |
| - run: bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration | |
| - name: Run Panther tests | |
| run: vendor/bin/phpunit --testsuite "Panther Test Suite" | |
| phpstan: | |
| runs-on: ubuntu-latest | |
| container: ghcr.io/myspeedpuzzling/web-base-php85:main | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: vendor | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer- | |
| - run: composer install --no-scripts --no-progress | |
| - run: bin/console cache:warmup --env=dev | |
| - run: composer run-script phpstan | |
| coding-standards: | |
| runs-on: ubuntu-latest | |
| container: ghcr.io/myspeedpuzzling/web-base-php85:main | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: vendor | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer- | |
| - run: composer install --no-scripts --no-progress | |
| - run: composer run cs | |
| migrations-up-to-date: | |
| runs-on: ubuntu-latest | |
| container: ghcr.io/myspeedpuzzling/web-base-php85:main | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: speedpuzzling_test | |
| options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: vendor | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer- | |
| - run: composer install --no-scripts --no-progress | |
| - run: bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration | |
| - run: bin/console doctrine:schema:update --dump-sql | |
| - run: bin/console doctrine:schema:validate |