Skip to content

Commit

Permalink
Merge branch 'main' into fix/php
Browse files Browse the repository at this point in the history
  • Loading branch information
bram-pkg committed Dec 7, 2022
2 parents 0b23659 + c9dec13 commit 42d58cc
Show file tree
Hide file tree
Showing 9 changed files with 235 additions and 153 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Expand Up @@ -5,6 +5,7 @@
/.gitattributes export-ignore
/.gitignore export-ignore
/.php-cs-fixer.dist.php export-ignore
/.yamllint.yaml export-ignore
/codecov.yml export-ignore
/Makefile export-ignore
/phpstan-baseline.neon export-ignore
Expand Down
6 changes: 3 additions & 3 deletions .github/stale.yml
@@ -1,10 +1,10 @@
daysUntilStale: 14
daysUntilClose: 7
exemptLabels:
- pinned
- security
- "pinned"
- "security"
# Label to use when marking an issue as stale
staleLabel: lifecycle/stale
staleLabel: "lifecycle/stale"
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/bc-check.yml
@@ -1,21 +1,20 @@

on:
pull_request:
on: # yamllint disable-line rule:truthy
pull_request: ~
push:
branches:
- "main"
- "[0-9].*"

name: BC Check
name: "BC Check"

jobs:
roave-bc-check:
name: Roave BC Check
runs-on: ubuntu-latest
name: "Roave BC Check"
runs-on: "ubuntu-latest"

steps:
- name: Checkout code
uses: actions/checkout@v3
- name: "Checkout code"
uses: "actions/checkout@v3"

- name: Roave BC Check
uses: docker://nyholm/roave-bc-check-ga
- name: "Roave BC Check"
uses: "docker://nyholm/roave-bc-check-ga"
48 changes: 24 additions & 24 deletions .github/workflows/branch-alias.yml
@@ -1,36 +1,36 @@
name: Update branch alias
name: "Update branch alias"

on:
on: # yamllint disable-line rule:truthy
push:
tags: ['*']
tags: ["*"]

jobs:
branch-alias:
name: Update branch alias
runs-on: ubuntu-latest
name: "Update branch alias"
runs-on: "ubuntu-latest"

steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
- name: "Set up PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: 7.4
coverage: none
php-version: "7.4"
coverage: "none"

- name: Checkout code
uses: actions/checkout@v3
- name: "Checkout code"
uses: "actions/checkout@v3"
with:
ref: main
ref: "main"

- name: Find branch alias
id: find_alias
- name: "Find branch alias"
id: "find_alias"
run: |
TAG=$(echo $GITHUB_REF | cut -d'/' -f 3)
echo "Last tag was $TAG"
ARR=(${TAG//./ })
ARR[1]=$((${ARR[1]}+1))
echo "name=alias::${ARR[0]}.${ARR[1]}" >> $GITHUB_OUTPUT
- name: Update branch alias
- name: "Update branch alias"
run: |
CURRENT_ALIAS=$(composer config extra.branch-alias.dev-main | cut -d'-' -f 1)
Expand All @@ -53,15 +53,15 @@ jobs:
composer config extra.branch-alias.dev-main ${{ steps.find_alias.outputs.alias }}-dev
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
- name: "Create Pull Request"
uses: "peter-evans/create-pull-request@v4"
with:
base: main
branch: branch-alias-update
author: GitHub <noreply@github.com>
committer: GitHub <noreply@github.com>
commit-message: Updating branch alias to ${{ steps.find_alias.outputs.alias }}
title: Update branch alias
labels: pinned, do not merge
base: "main"
branch: "branch-alias-update"
author: "GitHub <noreply@github.com>"
committer: "GitHub <noreply@github.com>"
commit-message: "Updating branch alias to ${{ steps.find_alias.outputs.alias }}"
title: "Update branch alias"
labels: "pinned, do not merge"
body: |
Since we just tagged a new version, we need to update composer.json branch alias. This should not be merged until there are new features, as it would prevent patch releases.
46 changes: 23 additions & 23 deletions .github/workflows/code-coverage.yml
@@ -1,57 +1,57 @@
on:
pull_request:
on: # yamllint disable-line rule:truthy
pull_request: ~
push:
branches:
- "main"
- "[0-9].*"

name: Code Coverage
name: "Code Coverage"

jobs:
code-coverage:
name: Code Coverage
name: "Code Coverage"

strategy:
matrix:
php-version:
- '8.0'
- "8.0"

runs-on: ubuntu-latest
runs-on: "ubuntu-latest"

steps:
- name: Checkout code
uses: actions/checkout@v3
- name: "Checkout code"
uses: "actions/checkout@v3"

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@v2"
with:
coverage: pcov
extensions: intl
php-version: ${{ matrix.php-version }}
coverage: "pcov"
extensions: "intl"
php-version: "${{ matrix.php-version }}"

- name: Determine composer cache directory
id: composer-cache
run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT
- name: "Determine composer cache directory"
id: "composer-cache"
run: "echo \"directory=$(composer config cache-dir)\" >> $GITHUB_OUTPUT"

- name: Cache dependencies installed with composer
uses: actions/cache@v3
- name: "Cache dependencies installed with composer"
uses: "actions/cache@v3"
with:
path: ${{ steps.composer-cache.outputs.directory }}
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}
path: "${{ steps.composer-cache.outputs.directory }}"
key: "composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}"
restore-keys: |
composer-${{ runner.os }}-${{ matrix.php-version }}-
composer-${{ runner.os }}-
composer-
- name: Download dependencies
- name: "Download dependencies"
run: |
composer update --no-interaction --no-progress --optimize-autoloader
vendor/bin/simple-phpunit install
- name: Collect code coverage with PHPUnit
- name: "Collect code coverage with PHPUnit"
run: |
vendor/bin/simple-phpunit --coverage-clover=.build/logs/clover.xml
- name: Send code coverage report to codecov.io
- name: "Send code coverage report to codecov.io"
run: |
bash <(curl -s https://codecov.io/bash)
64 changes: 40 additions & 24 deletions .github/workflows/coding-standards.yml
@@ -1,63 +1,79 @@
on:
on: # yamllint disable-line rule:truthy
pull_request: ~
push:
branches:
- "main"
- "[0-9].*"

name: Coding Standards
name: "Coding Standards"

jobs:
php-cs-fixer:
name: php-cs-fixer
name: "php-cs-fixer"

runs-on: ubuntu-latest
runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "7.4"

steps:
- name: Checkout code
uses: actions/checkout@v3
- name: "Checkout code"
uses: "actions/checkout@v3"

- name: Set up PHP
uses: shivammathur/setup-php@v2
- name: "Set up PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: none
extensions: intl
php-version: ${{ matrix.php-version }}
coverage: "none"
extensions: "intl"
php-version: "${{ matrix.php-version }}"

- name: Determine composer cache directory
id: composer-cache
run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT
- name: "Determine composer cache directory"
id: "composer-cache"
run: "echo \"directory=$(composer config cache-dir)\" >> $GITHUB_OUTPUT"

- name: Cache dependencies installed with composer
uses: actions/cache@v3
- name: "Cache dependencies installed with composer"
uses: "actions/cache@v3"
with:
path: ${{ steps.composer-cache.outputs.directory }}
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}
path: "${{ steps.composer-cache.outputs.directory }}"
key: "composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}"
restore-keys: |
composer-${{ runner.os }}-${{ matrix.php-version }}-
composer-${{ runner.os }}-
composer-
- name: Download dependencies
- name: "Download dependencies"
run: |
composer update --no-interaction --no-progress --optimize-autoloader
composer bin php-cs-fixer install --no-interaction --no-progress --optimize-autoloader
- name: Cache cache file for php-cs-fixer
uses: actions/cache@v3
- name: "Cache cache file for php-cs-fixer"
uses: "actions/cache@v3"
with:
path: .php_cs.cache
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}
path: ".php_cs.cache"
key: "composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}"
restore-keys: |
composer-${{ runner.os }}-${{ matrix.php-version }}-
composer-${{ runner.os }}-
composer-
- name: Run php-cs-fixer
- name: "Run php-cs-fixer"
run: |
vendor/bin/php-cs-fixer fix --diff --dry-run --verbose
yamllint:
name: "yamllint"

runs-on: "ubuntu-latest"

steps:
- name: "Checkout code"
uses: "actions/checkout@v3"

- name: "Lint YAML files"
uses: "ibiqlik/action-yamllint@v3.1.1"
with:
config_file: ".yamllint.yaml"
file_or_dir: "."
strict: true

0 comments on commit 42d58cc

Please sign in to comment.