Skip to content

#71 - remove query cache #152

#71 - remove query cache

#71 - remove query cache #152

Workflow file for this run

name: Test&lint PHP codebase
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test-and-lint-php:
name: Test&lint PHP codebase
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache dependencies
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-composer-dependencies-${{ hashFiles('composer.lock') }}
restore-keys: ${{ runner.os }}-composer-dependencies
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1.9
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, intl
coverage: none
- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction --no-suggest
- name: Run PHP linter
run: composer cs:check
- name: Run PHPSTAN
run: composer phpstan
- name: Execute tests
run: |
php artisan test --env=ci
- name: Build_push-image
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: |
docker login -u ${{ secrets.LOGIN }} -p ${{ secrets.PASS }}
docker build . -f ./.docker/php/Dockerfile -t ${{ secrets.ACR }}/${{ secrets.APPLICATION }}:latest
docker push ${{ secrets.ACR }}/${{ secrets.APPLICATION }}:latest
echo "Deploy successfully!"