Skip to content

Commit

Permalink
Merge pull request #23 from rotaract/feature/enhance-workflow
Browse files Browse the repository at this point in the history
Fix plugin for PHP 7.4
  • Loading branch information
zimbcode authored Jun 20, 2022
2 parents ed11c4b + 960222f commit aaaa9b2
Show file tree
Hide file tree
Showing 3 changed files with 151 additions and 127 deletions.
67 changes: 42 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,46 @@ on:
jobs:
build:
runs-on: ubuntu-latest


env:
php-version: latest
extensions: imagick
key: rotaract-club-finder # an be any string, change to clear the extension cache.
steps:
- uses: actions/checkout@v2

- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Cleanup composer development packages and optimize autoloader
run: composer install --no-dev --no-interaction --no-progress --optimize-autoloader --classmap-authoritative

- name: Upload Plugin
uses: actions/upload-artifact@v2
with:
name: rotaract-club-finder
path: |
./*
!tmp
!.*
- uses: actions/checkout@v2

- name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ env.php-version }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}

- name: Cache extensions
uses: actions/cache@v2
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php-version }}
extensions: ${{ env.extensions }}

- name: Validate composer.json and composer.lock
run: composer validate

- name: Cleanup composer development packages and optimize autoloader
run: composer install --no-dev --no-interaction --no-progress --optimize-autoloader --classmap-authoritative

- name: Upload Plugin
uses: actions/upload-artifact@v2
with:
name: rotaract-club-finder
path: |
./*
!tmp
!.*
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"issues": "https://github.com/rotaract/rotaract-club-finder/issues"
},
"require": {
"php": ">=7.4",
"elasticsearch/elasticsearch": "~7.0"
},
"require-dev": {
Expand All @@ -35,6 +36,9 @@
"translate": "wp-cli i18n make-mo languages"
},
"config": {
"platform": {
"php": "7.4"
},
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
Expand Down
Loading

0 comments on commit aaaa9b2

Please sign in to comment.