Skip to content

Commit

Permalink
Merge pull request #151 from moderntribe/test/git-hooks
Browse files Browse the repository at this point in the history
[CHORE] Github Actions/Lefthook updates
  • Loading branch information
JMRhodes authored Aug 19, 2024
2 parents 9fc039e + b50696c commit 698493e
Show file tree
Hide file tree
Showing 12 changed files with 104 additions and 109 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ name: 'Code Quality Checks'
on:
workflow_dispatch:
pull_request:
branches:
- main
- develop
types:
- opened
push:
branches:
- main
Expand All @@ -29,9 +28,10 @@ jobs:
secrets:
COMPOSER_AUTH_JSON: ${{ secrets.COMPOSER_AUTH_JSON }}

slic:
name: 'PHP Tests'
needs: [coding-standards, phpstan, linting]
uses: ./.github/workflows/php-tests.yml
secrets:
COMPOSER_AUTH_JSON: ${{ secrets.COMPOSER_AUTH_JSON }}
# Enable this job if you have PHPUnit tests
# slic:
# name: 'PHP Tests'
# needs: [coding-standards, phpstan, linting]
# uses: ./.github/workflows/php-tests.yml
# secrets:
# COMPOSER_AUTH_JSON: ${{ secrets.COMPOSER_AUTH_JSON }}
4 changes: 2 additions & 2 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
php-version: '8.0'
php-version: '8.2'
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -36,7 +36,7 @@ jobs:
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
php-version: '8.0'
php-version: '8.2'
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -38,7 +38,7 @@ jobs:
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
php-version: '8.0'
php-version: '8.2'
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -39,7 +39,7 @@ jobs:
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/php-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
if: steps.changed-files.outputs.tests == 'true'
with:
path: ${{ steps.composer-cache.outputs.dir }}
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
${SLIC_BIN} build-subdir off
${SLIC_BIN} xdebug off
${SLIC_BIN} debug on
${SLIC_BIN} php-version set 8.0
${SLIC_BIN} php-version set 8.2
${SLIC_BIN} info
${SLIC_BIN} config
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ jobs:
uses: shivammathur/setup-php@v2
with:
tools: composer:2
php-version: '8.1'
php-version: '8.2'

- name: Get Composer Cache Directory
id: composer-cache
if: steps.changed-files.outputs.phpcs == 'true'
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
if: steps.changed-files.outputs.phpcs == 'true'
with:
path: ${{ steps.composer-cache.outputs.dir }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
if: steps.changed-files.outputs.phpstan == 'true'
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
extensions: mbstring, intl
coverage: none
tools: composer:2
Expand Down
2 changes: 1 addition & 1 deletion .lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ config:
database: mariadb
composer_version: 2-latest
via: nginx
xdebug: true
xdebug: false
memcached: true
services:
appserver:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format

## [2024.08]
- Updated: Moose 2.0; See specific updates in the [Github PR here](https://github.com/moderntribe/moose/pull/152). Design requirements in the [Jira ticket here](https://moderntribe.atlassian.net/browse/MOOSE-99).
- Chore: Github Action workflow updates to use the latest versions of actions/cache.
- Chore: Github Action tests job removed to conserve resources. Tests should be run locally.
- Updated: Composer PHP minimum requirement set to 8.2 to match expected platform version.
- Updated: GHA Code quality workflow dispatch to Pull Requests opened.

## [2024.07]
- Chore: WP version to 6.6.1
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"wpackagist-plugin/debug-bar": "^1.1"
},
"require": {
"php": "^8.0|^8.1|^8.2",
"php": "^8.2",
"block-editor-custom-alignments/block-editor-custom-alignments": "^1.0",
"composer/installers": "^2.2",
"humanmade/s3-uploads": "^3.0",
Expand Down
Loading

0 comments on commit 698493e

Please sign in to comment.