Skip to content

Commit

Permalink
Merge branch '4.x' into issue/7127-propagate-entry-parent
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga committed Nov 10, 2023
2 parents 869b211 + 8ef3b8c commit 1196da0
Show file tree
Hide file tree
Showing 2,148 changed files with 68,279 additions and 57,604 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/pint-fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Fix PHP code style issues

on:
push:
paths:
- '**.php'

permissions:
contents: write

jobs:
fix-php-code-styling:
runs-on: ubuntu-latest
if: github.repository_owner == 'statamic'

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.PINT }}

- name: Fix PHP code style issues
uses: aglipanci/laravel-pint-action@1.0.0

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Fix styling
20 changes: 20 additions & 0 deletions .github/workflows/pint-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lint PHP code style issues

on:
pull_request:
paths:
- '**.php'

jobs:
lint-php-code-styling:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Check PHP code style issues
uses: aglipanci/laravel-pint-action@1.0.0
with:
testMode: true
verboseMode: true
13 changes: 13 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Pull Request Title

on:
pull_request:
types: [opened, edited, synchronize, reopened]

jobs:
pr-title:
runs-on: ubuntu-latest
steps:
- uses: deepakputhraya/action-pr-title@master
with:
regex: '^\[\d+\.x\]\s'
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,22 @@ jobs:
- name: Checkout code
uses: actions/checkout@v1

- name: Use Node.js 16.13.0
uses: actions/setup-node@v2
with:
node-version: 16.13.0

- name: Install required npm version
run: npm -g install npm@8.5.5

- name: Install dependencies
run: npm ci

- name: Compile assets
run: npm run production
run: npm run build

- name: Compile frontend assets
run: npm run frontend-prod
run: npm run frontend-build

- name: Create dist zip
run: cd resources && tar -czvf dist.tar.gz dist
Expand Down
98 changes: 61 additions & 37 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,68 +13,74 @@ jobs:

strategy:
matrix:
php: [7.4, 8.0, 8.1]
laravel: [8.*, 9.*]
php: [8.0, 8.1, 8.2, 8.3]
laravel: [9.*, 10.*]
stability: [prefer-lowest, prefer-stable]
os: [ubuntu-latest]
include:
- laravel: 8.*
- laravel: 9.*
- os: windows-latest
php: 7.4
laravel: 8.*
php: 8.1
laravel: 9.*
stability: prefer-stable
- os: windows-latest
php: 8.1
laravel: 9.*
laravel: 10.*
stability: prefer-stable
exclude:
- laravel: 9.*
php: 7.4
- php: 8.0
laravel: 10.*
- php: 8.3
laravel: 9.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

steps:
- name: Install French Locale
run: sudo apt-get install language-pack-fr
if: matrix.os == 'ubuntu-latest'

- name: Checkout code
uses: actions/checkout@v1

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v36
with:
files: |
config
resources/lang
resources/users
resources/views
routes
src
tests
composer.json
phpunit.xml.dist
.github/workflows/tests.yml
**.php
- name: Determine whether tests should run
id: should-run-tests
if: steps.changed-files.outputs.any_modified == 'true' || github.event_name == 'schedule'
run: echo "result=true" >> $GITHUB_OUTPUT

- name: Update apt sources
if: steps.should-run-tests.outputs.result == 'true' && matrix.os == 'ubuntu-latest'
run: |
sudo apt-get check || sudo apt --fix-broken install -y
sudo apt-get update
- name: Install French Locale
if: steps.should-run-tests.outputs.result == 'true' && matrix.os == 'ubuntu-latest'
run: sudo apt-get install language-pack-fr

- name: Setup PHP
uses: shivammathur/setup-php@v2
if: steps.should-run-tests.outputs.result == 'true'
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: none

- name: Set PHP 7.4 Mockery
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: composer require "mockery/mockery >=1.2.3" --no-interaction --no-update
if: matrix.php >= 7.4 && matrix.php <8.0

- name: Set PHP 8 Mockery
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: composer require "mockery/mockery >=1.3.3" --no-interaction --no-update
if: matrix.php >= 8.0

- name: Set PHP 8.1 Testbench
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: composer require "orchestra/testbench ^6.22.0" --no-interaction --no-update
if: matrix.laravel == '8.*' && matrix.php >= 8.1

- name: Install dependencies
uses: nick-invision/retry@v2
if: steps.should-run-tests.outputs.result == 'true'
with:
timeout_minutes: 5
max_attempts: 5
Expand All @@ -83,9 +89,11 @@ jobs:
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: List Installed Dependencies
if: steps.should-run-tests.outputs.result == 'true'
run: composer show -D

- name: Execute tests
if: steps.should-run-tests.outputs.result == 'true'
run: vendor/bin/phpunit

js-tests:
Expand All @@ -98,13 +106,29 @@ jobs:
- name: Checkout code
uses: actions/checkout@v1

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v36
with:
files: |
**.{js,vue,ts}
package.json
- name: Determine whether tests should run
id: should-run-tests
if: steps.changed-files.outputs.any_modified == 'true' || github.event_name == 'schedule'
run: echo "result=true" >> $GITHUB_OUTPUT

- name: Install required npm version
if: steps.should-run-tests.outputs.result == 'true'
run: npm -g install npm@8.5.5

- name: Install dependencies
if: steps.should-run-tests.outputs.result == 'true'
run: npm ci

- name: Execute tests
if: steps.should-run-tests.outputs.result == 'true'
run: npm run test

slack:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ tests/Fakes/Composer/Package/test-package/composer.json
resources/dist
resources/dist-frontend
composer.lock
.env
2 changes: 0 additions & 2 deletions .styleci.yml

This file was deleted.

Loading

0 comments on commit 1196da0

Please sign in to comment.