fix: Change method call #87
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
name: Stable Branch Workflow | |
on: | |
push: | |
branches: [ "[0-9]+.x", "stable" ] | |
workflow_dispatch: ~ | |
pull_request: | |
branches: [ "[0-9]+.x", "stable" ] | |
types: [ opened, synchronize, reopened ] | |
jobs: | |
test: | |
strategy: | |
matrix: | |
php: [ '7.4', '8.0', '8.1' ] | |
name: Run PHP tests | |
if: | | |
!(github.event_name == 'push' && contains(github.event.head_commit.message, '[skip ci]')) && | |
!(github.event_name == 'pull_request' && contains(join(github.event.pull_request.title, github.event.pull_request.body), '[skip ci]')) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone code repo | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
tools: composer:v2 | |
- name: Install dependencies | |
run: composer install | |
- name: Run phpunit | |
run: php vendor/bin/phpunit | |
code-quality: | |
name: Run code quality checks | |
runs-on: ubuntu-latest | |
if: | | |
!(github.event_name == 'push' && contains(github.event.head_commit.message, '[skip ci]')) && | |
!(github.event_name == 'pull_request' && contains(join(github.event.pull_request.title, github.event.pull_request.body), '[skip ci]')) | |
steps: | |
- name: Clone code repo | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "8.1" | |
tools: composer:v2 | |
- name: Install dependencies | |
run: composer install | |
- name: Run phpcs | |
run: php vendor/bin/phpcs --standard=PSR2 src/Makaira/ | |
- name: Run phpmd | |
run: php vendor/bin/phpmd src/Makaira/ text codesize,design | |
release: | |
name: Create a new release | |
if: github.event_name != 'pull_request' | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone code repo | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Import GPG key | |
uses: crazy-max/ghaction-import-gpg@v2 | |
with: | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
env: | |
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
- name: Install npm dependencies | |
run: yarn | |
- name: Semantic release | |
run: yarn semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
GIT_AUTHOR_NAME: ${{ secrets.GIT_USERNAME }} | |
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_EMAIL }} | |
GIT_COMMITTER_NAME: ${{ secrets.GIT_USERNAME }} | |
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_EMAIL }} | |
GIT_CREDENTIALS: ${{ secrets.GIT_CREDENTIALS }} |