Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Pol Dellaiera <pol.dellaiera@protonmail.com>
- Loading branch information
Showing
6 changed files
with
231 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# https://docs.github.com/en/actions | ||
|
||
name: "Prune" | ||
|
||
on: # yamllint disable-line rule:truthy | ||
schedule: | ||
- cron: "0 12 * * *" | ||
|
||
env: | ||
DAYS_BEFORE_CLOSE: 5 | ||
DAYS_BEFORE_STALE: 5 | ||
|
||
jobs: | ||
prune: | ||
name: "Issues" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- name: "Prune issues and pull requests" | ||
uses: "actions/stale@v3.0.12" | ||
with: | ||
days-before-close: "${{ env.DAYS_BEFORE_CLOSE }}" | ||
days-before-stale: "${{ env.DAYS_BEFORE_STALE }}" | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
stale-issue-label: "stale" | ||
stale-issue-message: | | ||
Since this issue has not had any activity within the last ${{ env.DAYS_BEFORE_STALE }} days, I have marked it as stale. | ||
I will close it if no further activity occurs within the next ${{ env.DAYS_BEFORE_CLOSE }} days. | ||
stale-pr-label: "stale" | ||
stale-pr-message: | | ||
Since this pull request has not had any activity within the last ${{ env.DAYS_BEFORE_STALE }} days, I have marked it as stale. | ||
I will close it if no further activity occurs within the next ${{ env.DAYS_BEFORE_CLOSE }} days. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# https://docs.github.com/en/actions | ||
|
||
name: "Release" | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
tags: | ||
- "**" | ||
|
||
jobs: | ||
release: | ||
name: "Release" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Determine tag | ||
id: tag_name | ||
run: | | ||
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/} | ||
shell: bash | ||
|
||
- name: Get Changelog Entry | ||
id: changelog_reader | ||
uses: mindsers/changelog-reader-action@v2 | ||
with: | ||
version: ${{ steps.tag_name.outputs.current_version }} | ||
path: ./CHANGELOG.md | ||
|
||
- name: "Create release" | ||
uses: "actions/create-release@v1.1.4" | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
with: | ||
release_name: "${{ steps.tag_name.outputs.current_version }}" | ||
tag_name: "${{ steps.tag_name.outputs.current_version }}" | ||
body: ${{ steps.changelog_reader.outputs.changes }} | ||
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }} | ||
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions | ||
|
||
on: | ||
- pull_request | ||
- push | ||
|
||
name: "Continuous Integration" | ||
|
||
jobs: | ||
run: | ||
name: "Grumphp" | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
operating-system: [ubuntu-latest, windows-latest, macOS-latest] | ||
php-versions: ['7.1', '7.2', '7.3', '7.4'] | ||
|
||
steps: | ||
- name: Set git to use LF | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: gd,mbstring,xdebug | ||
|
||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Install dependencies | ||
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader | ||
|
||
- name: Run Grumphp | ||
run: vendor/bin/grumphp run --no-ansi -n | ||
env: | ||
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} | ||
|
||
- name: Send PSALM data | ||
run: vendor/bin/psalm --shepherd --stats | ||
continue-on-error: true | ||
|
||
- name: Send Scrutinizer data | ||
run: | | ||
wget https://scrutinizer-ci.com/ocular.phar | ||
php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml | ||
continue-on-error: true | ||
|
||
- name: Infection score report | ||
run: | | ||
vendor/bin/infection run -j 2 | ||
continue-on-error: true | ||
|
||
- name: PHP Insights report | ||
run: | | ||
rm -rf composer.lock vendor | ||
composer require nunomaduro/phpinsights --dev | ||
vendor/bin/phpinsights analyse src/ -n | ||
continue-on-error: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# https://docs.github.com/en/actions | ||
|
||
name: "Prune" | ||
|
||
on: # yamllint disable-line rule:truthy | ||
schedule: | ||
- cron: "0 12 * * *" | ||
|
||
env: | ||
DAYS_BEFORE_CLOSE: 5 | ||
DAYS_BEFORE_STALE: 5 | ||
|
||
jobs: | ||
prune: | ||
name: "Issues" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- name: "Prune issues and pull requests" | ||
uses: "actions/stale@v3.0.12" | ||
with: | ||
days-before-close: "${{ env.DAYS_BEFORE_CLOSE }}" | ||
days-before-stale: "${{ env.DAYS_BEFORE_STALE }}" | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
stale-issue-label: "stale" | ||
stale-issue-message: | | ||
Since this issue has not had any activity within the last ${{ env.DAYS_BEFORE_STALE }} days, I have marked it as stale. | ||
I will close it if no further activity occurs within the next ${{ env.DAYS_BEFORE_CLOSE }} days. | ||
stale-pr-label: "stale" | ||
stale-pr-message: | | ||
Since this pull request has not had any activity within the last ${{ env.DAYS_BEFORE_STALE }} days, I have marked it as stale. | ||
I will close it if no further activity occurs within the next ${{ env.DAYS_BEFORE_CLOSE }} days. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# https://docs.github.com/en/actions | ||
|
||
name: "Release" | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
tags: | ||
- "**" | ||
|
||
jobs: | ||
release: | ||
name: "Release" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Determine tag | ||
id: tag_name | ||
run: | | ||
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/} | ||
shell: bash | ||
|
||
- name: Get Changelog Entry | ||
id: changelog_reader | ||
uses: mindsers/changelog-reader-action@v2 | ||
with: | ||
version: ${{ steps.tag_name.outputs.current_version }} | ||
path: ./CHANGELOG.md | ||
|
||
- name: "Create release" | ||
uses: "actions/create-release@v1.1.4" | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
with: | ||
release_name: "${{ steps.tag_name.outputs.current_version }}" | ||
tag_name: "${{ steps.tag_name.outputs.current_version }}" | ||
body: ${{ steps.changelog_reader.outputs.changes }} | ||
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }} | ||
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }} |