Skip to content

Upgrade to Laravel 10, Tests run for POST + GET. #493

Upgrade to Laravel 10, Tests run for POST + GET.

Upgrade to Laravel 10, Tests run for POST + GET. #493

Workflow file for this run

name: 'pull-request'
on:
pull_request:
branches: [ 'main' ]
jobs:
test:
runs-on: ubuntu-latest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
services:
db-tests:
image: 'mysql/mysql-server:8.0'
env:
MYSQL_ROOT_PASSWORD: yap_root_password
MYSQL_DATABASE: yap
MYSQL_ROOT_HOST: '%'
ports:
- 3106:3306
steps:
- uses: actions/checkout@v2
id: code-checkout
- name: Validate composer.json and composer.lock
id: composer-validate
run: composer validate
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
id: install-dependencies
uses: php-actions/composer@v6
with:
php_version: 8.0
args: --prefer-dist --no-progress
- name: PHPCS checker
id: php-codesniffer
run: vendor/squizlabs/php_codesniffer/bin/phpcs
- name: Test
id: run-tests
run: |
cp config.test.php config.php
vendor/bin/pest --log-junit tests/test-results.xml
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
junit_files: "tests/*.xml"
- uses: act10ns/slack@v1
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
channel: '#yap-automation'
if: failure()