Skip to content
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
2 changes: 0 additions & 2 deletions .coveralls.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .github/card-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Backlog:
'In progress':
- 'Status: In Progress'
19 changes: 19 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
javascript:
- '**/*.js'
typescript:
- '**/*.ts'
php:
- '**/*.php'

'Type: Testing':
- '**/tests/*'
- '**/test/*'
- '**/__tests__/*'

'Type: Documentation':
- '**/*.md'

'Type: CI/CD':
- '.github/workflows/*.yml'
- '.circleci/*'
- '.travis.yml'
108 changes: 108 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
on:
pull_request:
push:
branches:
- master
tags:
- "!*"

name: Build

jobs:
phpcs:
name: PHP Code Sniffer
runs-on: ubuntu-latest
env:
CI: 1
TRAVIS_BUILD_DIR: ${{ github.workspace }}
TRAVIS_BUILD_STAGE_NAME: Test
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 3
- name: Prepare
run: bash bin/prepare.sh
- name: Check code style
run: bash bin/check/phpcs.sh
- 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
env:
CI: 1
TRAVIS_BUILD_DIR: ${{ github.workspace }}
TRAVIS_BUILD_STAGE_NAME: Test
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 3
- name: Prepare
run: bash bin/prepare.sh
- name: Check code style
run: bash bin/check/phpmd.sh
- 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-latest
env:
CI: 1
TRAVIS_BUILD_DIR: ${{ github.workspace }}
TRAVIS_BUILD_STAGE_NAME: Test
services:
mysql:
image: mysql
ports:
- 3306
strategy:
matrix:
php: ['7.2', '7.3']
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 3
- name: Switch PHP version
env:
PHP_VERSION: ${{ matrix.php }}
run: sudo ln -sf "/usr/bin/php$PHP_VERSION" /etc/alternatives/php
- name: Prepare
run: bash bin/prepare.sh
- name: Run tests
run: bash bin/test/phpunit.sh
- name: Codecov
run: curl -s https://codecov.io/bash | bash -s -- -t $CODECOV_TOKEN -f $COVERAGE_FILE
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
COVERAGE_FILE: ./coverage/clover.xml
- 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: [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:
types: [opened]
name: Issue opened
jobs:
assign:
name: Assign issues to project
runs-on: ubuntu-latest
steps:
- name: Assign issues to project
uses: alex-page/github-project-automation-plus@v0.0.3
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
uses: technote-space/assign-author@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33 changes: 33 additions & 0 deletions .github/workflows/pr_opened.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
pull_request:
types: [opened]
name: Pull Request opened
jobs:
assignToProject:
name: Assign PullRequest to Project
runs-on: ubuntu-latest
steps:
- name: Assign PullRequest to Project
uses: alex-page/github-project-automation-plus@v0.0.3
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
uses: technote-space/assign-author@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

addLabelsByBranch:
name: PR Labeler
runs-on: ubuntu-latest
steps:
- name: PR Labeler
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 }}
13 changes: 13 additions & 0 deletions .github/workflows/project_card_moved.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
on:
project_card:
types: [moved]
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 }}
72 changes: 72 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
on:
push:
tags:
- 'v*'

name: Release

jobs:
test:
name: Test
runs-on: ubuntu-latest
env:
CI: 1
TRAVIS_BUILD_DIR: ${{ github.workspace }}
steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 3
- name: Run tests
run: bash bin/test/phpunit.sh
- uses: 8398a7/action-slack@v1
with:
type: failure
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()

releases:
name: Upload build files
needs: test
runs-on: ubuntu-latest
env:
CI: 1
TRAVIS_BUILD_DIR: ${{ github.workspace }}
TRAVIS_BUILD_STAGE_NAME: Deploy
steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 3
- name: Prepare
run: bash bin/prepare.sh
- name: Build
run: source bin/deploy/env.sh && bash bin/deploy/gh-releases.sh
- name: Upload
uses: technote-fork/action-gh-release@v1
with:
files: release.zip
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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: [releases]
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 }}
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:
toc:
name: TOC Generator
runs-on: ubuntu-latest
steps:
- name: TOC Generator
uses: technote-space/toc-generator@v1
with:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
27 changes: 1 addition & 26 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,13 @@ branches:
- master
- "/^v[0-9\\.]+/"

cache:
directories:
- "${HOME}/.composer/cache"
- "${TRAVIS_BUILD_DIR}/.work/cache"
cache: yarn

stages:
- name: check
if: branch = master and tag IS blank and type IN (pull_request, api)
- name: test
if: branch = master and tag IS blank and type IN (pull_request, api)
- name: deploy
if: tag IS present

before_script:
- bash bin/prepare.sh
Expand All @@ -59,23 +54,3 @@ jobs:
language: php
php: '7.3'
script: bash bin/test/phpunit.sh

- stage: deploy
language: php
php: '7.2'
script: skip
before_deploy:
- source bin/deploy/env.sh
- bash bin/deploy/gh-releases.sh
deploy:
provider: releases
skip_cleanup: true
name: ${RELEASE_TITLE}
tag_name: ${RELEASE_TAG}
file: ${RELEASE_FILE}
body: ${RELEASE_BODY}
api_key:
secure: PbQVI55zK/y8nYM+p3TpCfpFuiKhWw/rAsI4chWI+YfW3eU8U9WeVnNR9qT8obQPHQQz11yidxeo2UdwEDKYfqQO49NTej5bsrRVL044pMwDW2tjQSMQ4gO6//6KRmuEU++n3gotwENpnsBx8fYyebb6MMo4mgMQgoz5Fl1KAq7b41o6f1Xlsq6ENcW5x5oyhcUoJ6C8lUIVuNn3FJJHdM551V7PJ9tQm1BiHZ/0EoCIIpgY8ko+tIppMQU6vJkk6lHwGu1S6bCjx0EdmVxIUDwuNekfsTTHbLtiJqvESDIYi7kzsxYeeY5irNYgyjHkS6Uf2pe6csLMm5LmkINbKKbnUPD2vyzrO5fy3dc7ixpUtJEylR7gQloJ81+w1hz8ONk+aQRcjCgVN3hdgmouBROTstaTzXoJXsfSGg/4dyiSWHI808pS10NqDTh9Zb7xSwBKHHcZusPSdOMT6HlMUAoUag5AZr2i4psfoTDLyq0C98QOueaEiHMOy0McgGH1DeR9V8b3qFMwkmqbaLEaWfzr0jX1RQNVShHAuylKzB5AtKDRDJMluYSkkSHP/BidcdCBuFBhUTwYEA4QETs/qdSox9F1vSssrr6JxCgEEjAFUVGIHSgQxFaNGz6LDNjnIQN7HpPui5sOsr69GAmIqNkD139EWdUVg1el154y7SE=
overwrite: true
on:
tags: true
Loading