Skip to content

Updating to php >= 8.3 #272

Updating to php >= 8.3

Updating to php >= 8.3 #272

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ '*' ]
jobs:
tests:
strategy:
matrix:
version: [8.3]
name: Tests
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.version }}
tools: composer
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Build the stack
run: docker-compose up -d
- name: Static analyser
run: composer stan
- name: Run pre-unit requirements
run: composer pre-unit
- name: Boot socket
run: ./bin/console -e test aln:socket:run &
- name: Boot feeder simulators
run: |
./bin/console -e test aln:feeder:simulate --fast ABC123456789 &
./bin/console -e test aln:feeder:simulate --not-responding --fast OBU293827463 &
- name: Wait for the script to complete
run: sleep 5
- name: Run PhpUnit
run: ./vendor/bin/phpunit
deploy:
name: Deploy in production
needs: tests
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
tools: composer
- name: Install dependencies
run: APP_ENV=prod APP_DEBUG=0 composer install --no-dev --optimize-autoloader --prefer-dist --no-progress --no-suggest
- name: Rsync deploy
uses: Burnett01/[email protected]
with:
switches: -avzr --delete --exclude '.git' --exclude 'config/jwt' --exclude 'var' --exclude '.env.local' --exclude '.env.*.local' --exclude '.github' --exclude '.phpunit.cache' --exclude '.php-cs-fixer.cache'
path: /
remote_path: ${{ secrets.DEPLOY_PATH }}
remote_host: ${{ secrets.DEPLOY_HOST }}
remote_port: ${{ secrets.DEPLOY_PORT }}
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_KEY }}
- name: Execute post-deploy actions
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEPLOY_HOST }}
port: ${{ secrets.DEPLOY_PORT }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
script: |
cd ${{ secrets.DEPLOY_PATH }}
./scripts/post-deploy