Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #155

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
18 changes: 4 additions & 14 deletions .github/workflows/create-build-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and publish the ZIP build file

on:
pull_request:
types: [ opened, synchronize, ready_for_review ]
types: [opened, synchronize, ready_for_review]
branches-ignore:
- "update_dependencies"
jobs:
Expand All @@ -16,20 +16,10 @@ jobs:
steps:
- uses: actions/checkout@master
- name: Setup node 14
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 14.x
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Configure Composer cache
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
cache: "yarn"
- name: Install composer deps
run: composer install --no-dev --prefer-dist --no-progress --no-suggest
- name: Install yarn deps
Expand Down Expand Up @@ -102,4 +92,4 @@ jobs:
comment-id: ${{ steps.find-comment.outputs.comment-id }}
token: ${{ secrets.BOT_TOKEN }}
edit-mode: replace
body: ${{ steps.get-comment-body.outputs.body }}
body: ${{ steps.get-comment-body.outputs.body }}
13 changes: 2 additions & 11 deletions .github/workflows/create-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,7 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
cache: "yarn"
- name: Release new version
id: release
run: |
Expand All @@ -53,4 +44,4 @@ jobs:
steps:
- name: Meep
run: |
echo "Nothing to do"
echo "Nothing to do"
23 changes: 7 additions & 16 deletions .github/workflows/deploy-s3-store.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,10 @@ jobs:
steps:
- uses: actions/checkout@master
- name: Setup node 14
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 14.x
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
cache: "yarn"
- name: Build & create dist/artifact
run: |
yarn install --frozen-lockfile
Expand All @@ -43,8 +34,8 @@ jobs:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET_DOWNLOADS }}
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DOWNLOADS_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DOWNLOADS_AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-1' # optional: defaults to us-east-1
SOURCE_DIR: 'artifact' # optional: defaults to entire repository
AWS_REGION: "us-west-1" # optional: defaults to us-east-1
SOURCE_DIR: "artifact" # optional: defaults to entire repository
DEST_DIR: ${{ secrets.S3_AWS_PRODUCTS_FOLDER }}/$BUILD_NAME/latest
- name: Upload Tagged Version to S3
uses: jakejarvis/s3-sync-action@master
Expand All @@ -54,8 +45,8 @@ jobs:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET_DOWNLOADS }}
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DOWNLOADS_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DOWNLOADS_AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-1' # optional: defaults to us-east-1
SOURCE_DIR: 'artifact' # optional: defaults to entire repository
AWS_REGION: "us-west-1" # optional: defaults to us-east-1
SOURCE_DIR: "artifact" # optional: defaults to entire repository
DEST_DIR: ${{ secrets.S3_AWS_PRODUCTS_FOLDER }}/$BUILD_NAME/$BUILD_VERSION
- name: Send update to the store
env:
Expand All @@ -64,4 +55,4 @@ jobs:
STORE_URL: ${{ secrets.THEMEISLE_STORE_URL }}
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
BUILD_VERSION: ${{ env.BUILD_VERSION }}
uses: Codeinwp/action-store-release@main
uses: Codeinwp/action-store-release@main
12 changes: 6 additions & 6 deletions .github/workflows/diff-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ on:
pull_request:
types: [opened, edited, synchronize, ready_for_review]
branches:
- 'development'
- "development"

jobs:
translation:
runs-on: ubuntu-latest
steps:
- name: Checkout Ref Base
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: raft-head
- name: Setup node 14
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 14.x
- name: FRESH Makepot BASE
Expand All @@ -28,7 +28,7 @@ jobs:
yarn run build
ls languages/
- name: Checkout Ref Head
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: development
path: raft-base
Expand All @@ -45,7 +45,7 @@ jobs:
id: find_coomment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'pirate-bot'
comment-author: "pirate-bot"
body-includes: PR has POT difference
- name: Install PODiff
run: |
Expand All @@ -71,4 +71,4 @@ jobs:
teams:
- "sbs"
status: Has translation changes, a review from SBS team is required
token: ${{ secrets.BOT_TOKEN }}
token: ${{ secrets.BOT_TOKEN }}
17 changes: 4 additions & 13 deletions .github/workflows/test-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Test JS
on:
push:
branches-ignore:
- 'master'
- "master"

jobs:
jslint:
Expand All @@ -16,22 +16,13 @@ jobs:
- name: Checkout source code
uses: actions/checkout@master
- name: Setup node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
cache: "yarn"
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Build source
run: yarn run build
- name: Run lint checks
run: yarn run lint
run: yarn run lint
38 changes: 8 additions & 30 deletions .github/workflows/test-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,27 @@ name: Test PHP
on:
push:
branches-ignore:
- 'master'
- "master"

jobs:
phplint:
name: Phplint
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Setup PHP version
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
php-version: "7.2"
extensions: simplexml
- name: Checkout source code
uses: actions/checkout@v2
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Setup Composer cache
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
uses: actions/checkout@v4
- name: Install composer
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run PHPCS
run: composer run lint
phpunit:
name: Phpunit
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
services:
mysql:
image: mysql:5.7
Expand All @@ -47,26 +36,15 @@ jobs:
- name: Setup PHP version
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
php-version: "7.2"
extensions: simplexml, mysql
tools: phpunit-polyfills
- name: Checkout source code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install WordPress Test Suite
run: |
bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:${{ job.services.mysql.ports['3306'] }}
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Setup Composer cache
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install composer
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run phpunit
run: composer run-script phpunit
run: composer run-script phpunit
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ function define_constants() {
define( 'RAFT_DEBUG', defined( 'WP_DEBUG' ) && WP_DEBUG === true );
define( 'RAFT_DIR', trailingslashit( get_template_directory() ) );
define( 'RAFT_URL', trailingslashit( get_template_directory_uri() ) );
define( 'RAFT_PRODUCT_SLUG', basename( RAFT_DIR ) );
}

/**
Expand Down
Loading
Loading