Skip to content

chore: update PHP version in CI workflow to use php 8.3 #73

chore: update PHP version in CI workflow to use php 8.3

chore: update PHP version in CI workflow to use php 8.3 #73

Workflow file for this run

name: Core CI Pipeline
on: [ push, pull_request, workflow_dispatch ]
jobs:
build-assets:
permissions:
contents: write
uses: tastyigniter/workflows/.github/workflows/build-assets.yml@main
secrets:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
php-lint:
needs: build-assets
if: ${{ always() && needs.build-assets.result == 'success' }}
name: PHP Linting (Pint)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
tools: composer:v2
coverage: none
- name: Install composer dependencies
run: composer update --no-interaction --no-progress
- name: Run Laravel Pint
run: composer format
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: PHP Linting (Pint) - Fix styling
php-tests:
name: 'PHP Tests 8.3'
needs: php-lint
if: ${{ always() && needs.php-lint.result == 'success' }}
runs-on: ubuntu-latest
services:
mysql:
image: 'mysql:8.0'
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
env:
DB_PORT: 3306
DB_DATABASE: 'testbench'
DB_USERNAME: root
DB_PASSWORD: root
steps:
- name: Checkout changes
uses: actions/checkout@v4
- name: Create MySQL Database
run: |
sudo systemctl start mysql
mysql -u${{ env.DB_USERNAME }} -p${{ env.DB_PASSWORD }} -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' --port ${{ job.services.mysql.ports['3306'] }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: dom, curl, xml, mbstring, zip, pdo, sqlite, bcmath, soap, intl, gd
tools: composer:v2
coverage: xdebug
- name: Install composer dependencies
run: composer update --no-interaction --no-progress
- name: Execute static analysis
run: composer static
- name: Run test suite
run: vendor/bin/pest --coverage --exactly=100 --parallel --processes=10