Skip to content

[Debt] Bump environment to PHP 8.3 #21171

[Debt] Bump environment to PHP 8.3

[Debt] Bump environment to PHP 8.3 #21171

Workflow file for this run

name: Lint
on:
push:
branches: [main]
paths:
- .github/workflows/*lint*.yml
- apps/**
- packages/**
- api/**
pull_request:
paths:
- .github/workflows/*lint*.yml
- apps/**
- packages/**
- api/**
merge_group:
branches: [main]
jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
env:
PNPM_VERSION: "9.12.3"
services:
postgres:
image: postgres:12.15
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password1234
POSTGRES_DB: gctalent
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
steps:
- uses: actions/checkout@v4
- name: Add postgres extension pgcrypto # not included with postgres 12
run: docker run --rm --network ${{ job.container.network }} postgres:12.15 sh -c "PGPASSWORD=password1234 exec psql -h postgres -d gctalent -p 5432 -U postgres -t -c 'CREATE EXTENSION IF NOT EXISTS pgcrypto';"
- name: "Copy .env"
working-directory: "./apps/web"
run: |
cp .env.example .env
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: "./.nvmrc"
cache: pnpm
- name: "Install dependencies: workspace"
working-directory: ./
run: pnpm install
- name: "Setup: all workspaces"
working-directory: ./
run: pnpm run build:fresh
- name: "Run ESlint: all workspaces"
working-directory: ./
run: pnpm run lint
- name: "Run typescript linting: all workspaces"
# Allow tsc linting to happen even if js linting step raises errors.
if: always()
working-directory: ./
run: pnpm run tsc
- name: "Run prettier check: all workspaces"
# Allow tsc linting to happen even if js linting step raises errors.
if: always()
working-directory: ./
run: pnpm run prettier
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
extensions: bcmath
- name: Install composer dependencies
working-directory: api
run: |
cp .env.example .env
composer install --no-interaction --prefer-dist --optimize-autoloader
- name: Run Pint
working-directory: api
run: vendor/bin/pint --test
- name: Run static analysis
working-directory: api
run: vendor/bin/phpstan analyse -c phpstan.neon