Skip to content

Commit

Permalink
v73.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gammamatrix committed Jul 6, 2024
1 parent c95dc77 commit b29fbc2
Show file tree
Hide file tree
Showing 28 changed files with 410 additions and 620 deletions.
126 changes: 76 additions & 50 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'CI'
name: "CI"

on:
push:
Expand Down Expand Up @@ -30,9 +30,9 @@ jobs:
echo "TIMESTAMP_START=$(date +'%s')" >> $GITHUB_OUTPUT
- name: "Slack notification: IN PROGRESS"
id: slack
uses: slackapi/slack-github-action@v1.25.0
uses: slackapi/slack-github-action@v1.26.0
with:
channel-id: 'C068A06PV43'
channel-id: "C068A06PV43"
payload: |
{
"text": "CI Build Status for playground-test: IN PROGRESS\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
Expand All @@ -49,11 +49,11 @@ jobs:
"fields": [
{
"type": "mrkdwn",
"text": "*Start:*\n${{ steps.timer_start.outputs.DATE_START }}"
"text": "*Start:* <!date^${{ steps.timer_start.outputs.TIMESTAMP_START }}^{date} at {time}|${{ steps.timer_start.outputs.DATE_START }}>"
},
{
"type": "mrkdwn",
"text": "*End:*\n--"
"text": "*End:* --"
}
]
},
Expand All @@ -71,18 +71,25 @@ jobs:
]
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*PR:* ${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Build:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Merge/Pull Request"
},
"url": "${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
},
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Build: ${{ github.run_id }}"
},
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
]
}
]
}
Expand All @@ -102,6 +109,7 @@ jobs:
version: "11.0"
php_version: "8.2"
php_extensions: intl xdebug
configuration: phpunit-ci.xml
coverage_clover: clover.xml
coverage_text: true
- name: Make code coverage badge
Expand All @@ -110,7 +118,7 @@ jobs:
coverage_badge_path: output/coverage.svg
push_badge: false
- name: Git push to testing/develop branch
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
publish_dir: ./output
publish_branch: testing/develop
Expand All @@ -122,6 +130,7 @@ jobs:
level: 9
php_version: "8.2"
path: config/ database/ resources/ src/ tests/Feature/ tests/Unit/
args: --verbose --debug
- name: Stopping timer
if: ${{ !cancelled() }}
id: timer_end
Expand All @@ -130,10 +139,11 @@ jobs:
run: |
echo "DATE_END=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_OUTPUT
echo "DURATION_PHRASE=$(($(date +'%s')-$TIMESTAMP_START)) seconds" >> $GITHUB_OUTPUT
echo "TIMESTAMP_END=$(date +'%s')" >> $GITHUB_OUTPUT
- name: "Slack notification: Done"
uses: slackapi/slack-github-action@v1.25.0
uses: slackapi/slack-github-action@v1.26.0
with:
channel-id: 'C068A06PV43'
channel-id: "C068A06PV43"
update-ts: ${{ steps.slack.outputs.ts }}
payload: |
{
Expand All @@ -151,11 +161,11 @@ jobs:
"fields": [
{
"type": "mrkdwn",
"text": "*Start:*\n${{ steps.timer_start.outputs.DATE_START }}"
"text": "*Start:* <!date^${{ steps.timer_start.outputs.TIMESTAMP_START }}^{date} at {time}|${{ steps.timer_start.outputs.DATE_START }}>"
},
{
"type": "mrkdwn",
"text": "*End:*\n${{ steps.timer_end.outputs.DATE_END }}"
"text": "*End:* <!date^${{ steps.timer_end.outputs.TIMESTAMP_END }}^{date} at {time}|${{ steps.timer_end.outputs.DATE_END }}>"
}
]
},
Expand All @@ -173,28 +183,36 @@ jobs:
]
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*PR:* ${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Build:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Merge/Pull Request"
},
"url": "${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
},
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Build: ${{ github.run_id }}"
},
"style": "primary",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
]
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
- name: "Send a notification for failures"
if: ${{ failure() }}
uses: slackapi/slack-github-action@v1.25.0
uses: slackapi/slack-github-action@v1.26.0
with:
channel-id: 'C068A06PV43'
channel-id: "C068A06PV43"
update-ts: ${{ steps.slack.outputs.ts }}
payload: |
{
Expand All @@ -212,11 +230,11 @@ jobs:
"fields": [
{
"type": "mrkdwn",
"text": "*Start:*\n${{ steps.timer_start.outputs.DATE_START }}"
"text": "*Start:* <!date^${{ steps.timer_start.outputs.TIMESTAMP_START }}^{date} at {time}|${{ steps.timer_start.outputs.DATE_START }}>"
},
{
"type": "mrkdwn",
"text": "*End:*\n${{ steps.timer_end.outputs.DATE_END }}"
"text": "*End:* <!date^${{ steps.timer_end.outputs.TIMESTAMP_END }}^{date} at {time}|${{ steps.timer_end.outputs.DATE_END }}>"
}
]
},
Expand All @@ -234,18 +252,26 @@ jobs:
]
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*PR:* ${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Build:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Merge/Pull Request"
},
"url": "${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
},
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Build: ${{ github.run_id }}"
},
"style": "danger",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
]
}
]
}
Expand Down
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,33 @@ See the contents of the published config file: [config/playground-test.php](conf

Information on [environment variables is available on the wiki for this package](https://github.com/gammamatrix/playground-test/wiki/Environment-Variables)

## Cloc

```sh
composer cloc
```

```
➜ playground-test git:(develop) ✗ composer cloc
> cloc --exclude-dir=output,vendor .
137 text files.
79 unique files.
59 files ignored.
github.com/AlDanial/cloc v 1.98 T=0.10 s (778.8 files/s, 87486.7 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
PHP 70 1556 1754 4816
XML 4 0 15 294
YAML 1 5 0 249
Markdown 3 35 0 88
JSON 1 0 0 63
-------------------------------------------------------------------------------
SUM: 79 1596 1769 5510
-------------------------------------------------------------------------------
```

## PHPStan

Tests at level 9 on:
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@
}
},
"scripts": {
"test": "vendor/bin/phpunit",
"analyse": "vendor/bin/phpstan analyse --verbose --debug --level max",
"cloc": "cloc --exclude-dir=output,vendor .",
"format": "vendor/bin/php-cs-fixer fix",
"analyse": "vendor/bin/phpstan analyse --verbose --debug --level max"
"test": "vendor/bin/phpunit"
}
}
118 changes: 0 additions & 118 deletions database/factories/AbstractPlaygroundUserFactory.php

This file was deleted.

Loading

0 comments on commit b29fbc2

Please sign in to comment.