-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/issue-948
# Conflicts: # src/Repository/Booking.php # tests/php/Repository/BookingTest.php
- Loading branch information
Showing
96 changed files
with
9,989 additions
and
6,164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: 'Build Plugin' | ||
description: 'Builds plugin into ./build/commonsbooking' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.0.6' # Not needed with a .ruby-version file | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
- run: gem install compass | ||
shell: bash | ||
|
||
- name: Cache Composer packages | ||
id: composer-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-php- | ||
- name: Install dependencies | ||
run: | | ||
composer install --no-dev --prefer-dist --no-progress | ||
shell: bash | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
- run: npm ci --legacy-peer-deps --include=dev | ||
shell: bash | ||
|
||
- name: Run build script | ||
run: bin/build-zip.sh --skip-zip | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Build zip from release branch | ||
on: | ||
push: | ||
branches: | ||
- 'release/**' | ||
|
||
jobs: | ||
zip-rc: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- uses: ./.github/actions/build-plugin | ||
|
||
- name: Generate zip | ||
uses: 10up/action-wordpress-plugin-build-zip@stable | ||
env: | ||
SLUG: commonsbooking | ||
BUILD_DIR: ./build/commonsbooking | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Compile changes | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'release/**' | ||
paths-ignore: | ||
- '**.md' | ||
- '**.txt' | ||
|
||
jobs: | ||
i18n-coverage: | ||
runs-on: ubuntu-20.04 | ||
name: Check i18n coverage | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
|
||
- name: Install WP-CLI | ||
run: | | ||
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | ||
chmod +x wp-cli.phar | ||
sudo mv wp-cli.phar /usr/local/bin/wp | ||
- name: Generate pot files | ||
run: bin/update-pot.sh | ||
|
||
- name: Commit changes | ||
uses: elstudio/actions-js-build/commit@v4 | ||
with: | ||
commitMessage: Ran wp i18n make-pot | ||
|
||
- name: Check i18n coverage | ||
uses: alexkiro/i18n-coverage@v1.0.1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
translations-path: 'languages/*.po' | ||
ignore-languages: 'en' | ||
|
||
grunt: | ||
runs-on: ubuntu-20.04 | ||
name: Run grunt and commit changes | ||
needs: i18n-coverage | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.0.6' # Not needed with a .ruby-version file | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
- run: gem install compass | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
||
- run: npm ci --legacy-peer-deps --include=dev | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate | ||
|
||
|
||
- name: Compile with Grunt | ||
uses: elstudio/actions-js-build/build@v4 | ||
with: | ||
args: build | ||
|
||
- name: Commit changes | ||
uses: elstudio/actions-js-build/commit@v4 | ||
with: | ||
commitMessage: Ran grunt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Deploy to WordPress.org | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
name: New Release | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- uses: ./.github/actions/build-plugin | ||
|
||
- name: Check i18n coverage before release | ||
uses: alexkiro/i18n-coverage@v1.0.1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
translations-path: 'languages/*.po' | ||
ignore-languages: 'en' | ||
min-coverage: 100 | ||
|
||
- name: WordPress Plugin Deploy | ||
uses: 10up/action-wordpress-plugin-deploy@stable | ||
with: | ||
dry-run: false | ||
generate-zip: true | ||
env: | ||
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | ||
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | ||
BUILD_DIR: build/commonsbooking | ||
SLUG: commonsbooking # optional, remove if GitHub repo name matches SVN slug, including capitalization | ||
|
||
- name: Upload release assets | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: ${{ steps.deploy.outputs.zip-path }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.