Skip to content
This repository was archived by the owner on Aug 1, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 157 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
on:
pull_request:
push:
branches:
- master
tags:
- "!*"

name: Build

jobs:
eslint:
name: ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 2
- name: Install Package dependencies
run: composer prepare:js
- name: Check code style
run: composer eslint
- uses: 8398a7/action-slack@v1
with:
type: failure
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()
phpcs:
name: PHP Code Sniffer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 2
- name: Prepare setting
run: git clone --depth=1 https://github.com/wp-content-framework/travis-ci.git travis-ci && bash travis-ci/bin/prepare.sh
env:
CI: 1
TRAVIS_BUILD_DIR: ${{ github.workspace }}
- name: Install Composer dependencies
run: composer prepare:php
- name: Check code style
run: composer phpcs
- uses: 8398a7/action-slack@v1
with:
type: failure
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()
phpmd:
name: PHPMD
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 2
- name: Prepare setting
run: git clone --depth=1 https://github.com/wp-content-framework/travis-ci.git travis-ci && bash travis-ci/bin/prepare.sh
env:
CI: 1
TRAVIS_BUILD_DIR: ${{ github.workspace }}
- name: Install Composer dependencies
run: composer prepare:php
- name: Check code style
run: composer phpmd
- uses: 8398a7/action-slack@v1
with:
type: failure
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()

jest:
name: Jest
needs: eslint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 2
- name: Install Package dependencies
run: composer prepare:js
- name: Run tests
run: composer jest
- uses: 8398a7/action-slack@v1
with:
type: failure
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()
phpunit:
name: PHPUnit
needs: [phpcs, phpmd]
runs-on: ubuntu-16.04
services:
mysql:
image: mysql
ports:
- 3306
strategy:
matrix:
php: ['7.0', '7.3', '5.6']
WP_VERSION: ['latest', '5.2']
WP_MULTISITE: ['0', '1']
include:
- php: '7.3'
WP_VERSION: 'latest'
WP_MULTISITE: '1'
ACTIVATE_POPULAR_PLUGINS: 1
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 2
- name: Switch PHP version
env:
PHP_VERSION: ${{ matrix.php }}
run: sudo ln -sf "/usr/bin/php$PHP_VERSION" /etc/alternatives/php
- name: Prepare setting
run: git clone --depth=1 https://github.com/wp-content-framework/travis-ci.git travis-ci && bash travis-ci/bin/prepare.sh
env:
CI: 1
TRAVIS_BUILD_DIR: ${{ github.workspace }}
WP_VERSION: ${{ matrix.WP_VERSION }}
ACTIVATE_POPULAR_PLUGINS: ${{ matrix.ACTIVATE_POPULAR_PLUGINS }}
- name: Run tests
run: bash travis-ci/bin/php/wp-test.sh
env:
CI: 1
DB_PASS: root
TRAVIS_BUILD_DIR: ${{ github.workspace }}
WP_VERSION: ${{ matrix.WP_VERSION }}
WP_MULTISITE: ${{ matrix.WP_MULTISITE }}
ACTIVATE_POPULAR_PLUGINS: ${{ matrix.ACTIVATE_POPULAR_PLUGINS }}
- uses: 8398a7/action-slack@v1
with:
type: failure
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()

slack:
name: Slack
needs: [jest, phpunit]
runs-on: ubuntu-latest
steps:
- uses: 8398a7/action-slack@v1
with:
type: success
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
14 changes: 14 additions & 0 deletions .github/workflows/gh_releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
on:
push:
branches:
- master
name: GitHub Releases
jobs:
draftRelease:
name: Draft Release
runs-on: ubuntu-latest
steps:
- name: Draft Release
uses: toolmantim/release-drafter@v5.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/issue_opened.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
on: issues
name: Issue opened
jobs:
assign:
name: Assign issues to project
runs-on: ubuntu-latest
steps:
- name: Assign issues to project
if: github.event.action == 'opened'
uses: alex-page/github-project-automation-plus@master
with:
project: Backlog
column: To do
repo-token: ${{ secrets.GITHUB_TOKEN }}

assignAuthor:
name: Assign author to issue
runs-on: ubuntu-latest
steps:
- name: Assign author to issue
if: github.event.action == 'opened'
uses: technote-space/assign-author@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/pr_opened.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on: pull_request
name: Pull Request opened
jobs:
assignToProject:
name: Assign PullRequest to Project
runs-on: ubuntu-latest
steps:
- name: Assign PullRequest to Project
if: github.event.action == 'opened'
uses: alex-page/github-project-automation-plus@master
with:
project: Backlog
column: To do
repo-token: ${{ secrets.GITHUB_TOKEN }}

assignAuthor:
name: Assign author to PR
runs-on: ubuntu-latest
steps:
- name: Assign Author to PR
if: github.event.action == 'opened'
uses: technote-space/assign-author@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

addLabelsByBranch:
name: PR Labeler
runs-on: ubuntu-latest
steps:
- name: PR Labeler
if: github.event.action == 'opened'
uses: technote-fork/pr-labeler-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 11 additions & 0 deletions .github/workflows/pr_updated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
on: pull_request
name: Pull Request updated
jobs:
triage:
name: Pull Request Labeler
runs-on: ubuntu-latest
steps:
- name: Pull Request Labeler
uses: actions/labeler@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
11 changes: 11 additions & 0 deletions .github/workflows/project_card_moved.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
on: project_card
name: Project Card Event
jobs:
triage:
name: Auto card labeler
runs-on: ubuntu-latest
steps:
- name: Auto card labeler
uses: technote-space/auto-card-labeler@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 11 additions & 0 deletions .github/workflows/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
on: push
name: TOC Generator
jobs:
assignAuthor:
name: TOC Generator
runs-on: ubuntu-latest
steps:
- name: TOC Generator
uses: technote-space/toc-generator@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading