Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial plugin version #12

Merged
merged 502 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
502 commits
Select commit Hold shift + click to select a range
6e576e8
WIP welcome widget
aristath Mar 27, 2024
d2b90d5
Add a REST-API endpoint to get the stats
aristath Mar 27, 2024
8cbd71b
Add note to get the REST-API endpoint URL
aristath Mar 27, 2024
bffc55e
CS (temporary)
aristath Mar 27, 2024
d87cf20
Cleanup: remove points-dev widget
aristath Mar 27, 2024
ee422d4
Change the dashboard widget to show just the gauge
aristath Mar 27, 2024
221d52c
bugfix for widget :poop:
aristath Mar 27, 2024
ca06df3
Only show the last 2 posts in the what's new feed
aristath Mar 27, 2024
a8f331e
Add files for PHPUnit tests
aristath Mar 28, 2024
d4f6ff1
remove unused methods from Date class
aristath Mar 28, 2024
263d009
Write tests for the Date class
aristath Mar 28, 2024
4ac6f08
Exclude end date from chart
aristath Mar 28, 2024
f492220
Basic tests for the Settings class
aristath Mar 28, 2024
9243c86
Start with the onboarding class
aristath Mar 28, 2024
293c3fc
Print the form
aristath Mar 28, 2024
d0ed207
Add the site-URL as a parameter to generate the nonce
aristath Mar 28, 2024
465f60c
use the correct remote URL
aristath Mar 28, 2024
5806905
URL fix
aristath Mar 28, 2024
66f0aa3
WIP - add scan form in welcome box
aristath Mar 29, 2024
86606fb
WIP
aristath Mar 29, 2024
ffabe31
minor tweak
aristath Mar 29, 2024
62c3c50
WIP
aristath Apr 1, 2024
a7ab89e
split functions
aristath Apr 1, 2024
2e6049e
Store the license.
aristath Apr 1, 2024
5ac376a
Fix saving the license key.
aristath Apr 1, 2024
c05cc37
WIP - there's still an error 400
aristath Apr 1, 2024
22510b9
cleanup
aristath Apr 2, 2024
0261ffc
Validate the token when getting stats remotely
aristath Apr 2, 2024
0cf5fa1
this is done
aristath Apr 2, 2024
118ca34
Rename class
aristath Apr 2, 2024
c2dfa55
cleanup for badges - remove categories
aristath Apr 2, 2024
69dbab3
Don't scan JS files with PHPCS
aristath Apr 2, 2024
b5d3603
Allow querying by id
aristath Apr 2, 2024
f8891d1
Add tests for activity
aristath Apr 2, 2024
054d581
Cleanup
aristath Apr 2, 2024
cc39f47
Add README.md files in folders (WIP - should add docs)
aristath Apr 2, 2024
fc0d223
add .gitattributes file
aristath Apr 2, 2024
11051c4
Add workflows
aristath Apr 3, 2024
457eb92
Remove TODO comment
aristath Apr 3, 2024
9c68466
Remove security workflow for now
aristath Apr 3, 2024
a0b6b08
Add main plugin headers
aristath Apr 3, 2024
8d42851
Comment-out blueprint-file linting
aristath Apr 3, 2024
5be2d08
Add basic readme.txt file
aristath Apr 3, 2024
845996d
Fix Date class methods docs
aristath Apr 3, 2024
6b08b63
Update badges files
aristath Apr 3, 2024
1d9fd50
Use a site transient for the blog feed
aristath Apr 3, 2024
95ca126
Print link to reset the password
aristath Apr 3, 2024
6e8d6fa
more onboarding tweaks
aristath Apr 3, 2024
aa78b9e
Add an extra condition in the personal-record-content widget
aristath Apr 3, 2024
67eb640
Move feed-related methods to the what's new widget
aristath Apr 3, 2024
34b51f0
fix nested paragraphs
aristath Apr 3, 2024
ef71a3f
Abstract big-counters rendering
aristath Apr 3, 2024
ea0c49c
Avoid duplicate labels in charts x-axis
aristath Apr 4, 2024
5878ab5
tweaks for the what's new widget
aristath Apr 4, 2024
1439c10
delete workflows not YET used
aristath Apr 4, 2024
f73f33b
Redirect to plugin page on activation
aristath Apr 4, 2024
d4988f2
Add uninstall routine to cleanup the database
aristath Apr 4, 2024
84aaa2c
Run phpstan checks and fix all reported issues
aristath Apr 4, 2024
90ee9fb
Try adding a workflow for phpstan
aristath Apr 4, 2024
4478031
commit the composer.lock file
aristath Apr 4, 2024
2295cfd
Update includes/class-activity.php
aristath Apr 5, 2024
72ba38b
Update includes/actions/class-content.php
aristath Apr 5, 2024
06123f9
Move inline styles to stylesheet
aristath Apr 5, 2024
280b905
Use magic __get() & __set() methods in Activity class
aristath Apr 5, 2024
815777e
update wpcs to 3.1
aristath Apr 5, 2024
1005dcf
Split content-scanning to separate class
aristath Apr 5, 2024
03af73a
Update authors in composer.json
aristath Apr 5, 2024
9c1444d
Rename `includes` folder to `classes` & move autoloader to plugin file
aristath Apr 5, 2024
0fff953
Fix phpstan errors
aristath Apr 5, 2024
4fa9f8c
remove useless README files
aristath Apr 5, 2024
1c8498b
Update readme.txt
aristath Apr 5, 2024
ff023ac
Update readme.txt
aristath Apr 5, 2024
8348fd6
Update progress-planner.php
aristath Apr 5, 2024
a7cff30
Update progress-planner.php
aristath Apr 5, 2024
5cdbbde
Update phpcs.xml.dist
aristath Apr 5, 2024
2b4fc4d
Update phpcs.xml.dist
aristath Apr 5, 2024
278a1bf
Update readme.txt
aristath Apr 5, 2024
e810a44
Update readme.txt
aristath Apr 5, 2024
99b6064
Update progress-planner.php
aristath Apr 5, 2024
0eae773
Update progress-planner.php
aristath Apr 5, 2024
274c3b0
make widgets classes final
aristath Apr 5, 2024
c38027b
Split method to get data for a period
aristath Apr 5, 2024
0138776
Use a const for default chart parameters and arguments.
aristath Apr 5, 2024
72b47ea
Fix phpstan warning
aristath Apr 5, 2024
9810807
alternative method to cleanup settings on uninstall
aristath Apr 5, 2024
1df7484
Use SVG logo
aristath Apr 5, 2024
7cf665a
Use default color for the words graph
aristath Apr 5, 2024
c51365b
Remove default margin from widget titles
aristath Apr 5, 2024
2ff13f4
Make widgets vertical
aristath Apr 8, 2024
cc8feab
Add shadow to badges
aristath Apr 8, 2024
655b761
gauge tweaks
aristath Apr 8, 2024
36a683e
Change big counters to 56px
aristath Apr 8, 2024
1be8c2e
More CSS tweaks
aristath Apr 8, 2024
4a005a5
Add icon to menu
aristath Apr 8, 2024
a407589
basic implementation for popups triggering
aristath Apr 8, 2024
c0e8169
Basic structure for popups
aristath Apr 8, 2024
25a4c9a
CSS tweaks & fixed phpstan/phpcs issues
aristath Apr 8, 2024
5183a5b
Table styles
aristath Apr 9, 2024
abb9bc1
WIP for badges popup
aristath Apr 9, 2024
d8cf208
CS & Stan fixes
aristath Apr 9, 2024
5e8b629
fix HTML error
aristath Apr 9, 2024
9ccb92b
more tweaks for the popup
aristath Apr 9, 2024
aaea86e
fix popup width
aristath Apr 9, 2024
e7d27f8
Fix vertical positioning of the popup
aristath Apr 9, 2024
83b7a35
tweak score gauge
aristath Apr 9, 2024
2532bcd
Add a failAction for posts scanning
aristath Apr 10, 2024
1235e48
Add first_name to the onboarding form
aristath Apr 11, 2024
8a309fe
Add a REMOTE_API_URL const
aristath Apr 11, 2024
3ee953a
Typo: `WP_User->ID`, not `->id`
aristath Apr 11, 2024
24b5ba2
Add linters for CSS & JS files, and fix all reported issues
aristath Apr 11, 2024
edce03a
fix input type
aristath Apr 12, 2024
a98950c
CSS tweaks for popup
aristath Apr 12, 2024
b99c5f9
WIP Tweaks for the welcome box
aristath Apr 12, 2024
aecd518
CSS tweaks
aristath Apr 15, 2024
ff7c08c
Tweak the onboarding form and add some content
aristath Apr 16, 2024
72b44ad
Exclude node_modules from phpstan
aristath Apr 16, 2024
1813089
Update .github/workflows/cs.yml
aristath Apr 16, 2024
ec0f623
Update .github/workflows/lint.yml
aristath Apr 16, 2024
afc7a01
Update .github/workflows/phpstan.yml
aristath Apr 16, 2024
48d1bfc
Update .github/workflows/phpunit.yml
aristath Apr 16, 2024
1c58784
Add branch info to readme
jdevalk Apr 16, 2024
41fab7c
add more files to export-ignore in .gitattributes
aristath Apr 16, 2024
4b4fb02
Add icons
jdevalk Apr 16, 2024
13c45c6
Merge branch 'develop' of github.com:Emilia-Capital/progress-planner …
jdevalk Apr 16, 2024
4700193
Add assets folder to export ignore
jdevalk Apr 16, 2024
94adc7c
Reset words count in post actions
aristath Apr 16, 2024
75b33c9
Cleaning up duplicates
aristath Apr 16, 2024
e7a4c41
Change URL for the what's new widget
aristath Apr 16, 2024
3790e9d
Add readme copy
jdevalk Apr 16, 2024
5ad7511
Merge branch 'develop' of github.com:Emilia-Capital/progress-planner …
jdevalk Apr 16, 2024
1b0ed79
Update to new tagline
jdevalk Apr 16, 2024
4c76582
Rename classes
jdevalk Apr 16, 2024
06c61f2
Fix keys in array
jdevalk Apr 16, 2024
d7458c9
Fix order of array
jdevalk Apr 16, 2024
f127440
rename files
aristath Apr 16, 2024
34d5b02
rename badges in arrays
aristath Apr 16, 2024
74c9cd8
Merge pull request #15 from Emilia-Capital/jdv/rename-badges
aristath Apr 16, 2024
89de7e4
correct order for badges
aristath Apr 17, 2024
1a76ecd
missed these arrays when renaming badges
aristath Apr 17, 2024
f77d94c
fix popups overlay
aristath Apr 17, 2024
49422a5
Split popups JS & add a close button
aristath Apr 17, 2024
f4d668e
rename admin.js to header-filters.js
aristath Apr 17, 2024
9273e78
Add watermarks to widgets
aristath Apr 17, 2024
6d7ac46
export-ignore more files
aristath Apr 17, 2024
540af0b
CSS tweaks for #17
aristath Apr 19, 2024
2ecb27f
enlarge widgets progressively
aristath Apr 22, 2024
5b6ef6e
Reduce line-height to 1.2
aristath Apr 22, 2024
08d41fa
Update class-published-content-density.php
jdevalk Apr 22, 2024
6f61146
Merge pull request #18 from Emilia-Capital/jdevalk/add-period
aristath Apr 22, 2024
3e4f9a6
style the onboarding widget
aristath Apr 23, 2024
58b2988
Split method to get chart data.
aristath Apr 24, 2024
7e8f353
Add scores to the REST API
aristath Apr 24, 2024
e1ae41e
Add website score to the REST-API
aristath Apr 24, 2024
de0689b
REST-API: Don't check the license-key if it's unset
aristath Apr 24, 2024
476ba5d
Allow filtering the widgets (will allow us to add more in PRO)
aristath Apr 26, 2024
9379418
phpstan fix
aristath Apr 26, 2024
dc12666
Improve score calculation
aristath Apr 30, 2024
764e689
typo
aristath Apr 30, 2024
584c95f
Use gray for the latest (current) week/month in activity scores
aristath Apr 30, 2024
4dc383f
Fixes #16
aristath May 2, 2024
2e045f9
WIP - responsive fixes
aristath May 2, 2024
a64f978
Handle small screen-sizes
aristath May 8, 2024
7f44d64
More responsive tweaks
aristath May 8, 2024
7cf2003
Escape content
aristath May 13, 2024
4963e6a
use progress_planner_ as a prefix
aristath May 13, 2024
f77b26e
exit if accessed directly
aristath May 13, 2024
3d6dbf5
Rename the namespace
aristath May 13, 2024
5822bb5
CS fix
aristath May 13, 2024
76a0bbf
Add a note in the subscription form to make it clearer
aristath May 13, 2024
4de5e82
Add paragraph in readme file
aristath May 13, 2024
8fbc00e
Tweak the REST-API response
aristath May 13, 2024
66491ba
Add translators comment
aristath May 14, 2024
4259001
Add more info to badges in API response
aristath May 14, 2024
e3e1bd3
Tweak readme file: add links for site pages (privacy & terms/conditions)
aristath May 14, 2024
4470b63
Log the key
aristath May 22, 2024
18a9c2c
improve response
aristath May 22, 2024
2011f8c
Split license option
aristath May 23, 2024
7ceaff8
fix progressbar out of view
aristath May 23, 2024
c1bb1d6
Add the Yoast CS rules & composer-update
aristath May 23, 2024
90c7901
Add timezone-offset data
aristath May 23, 2024
18c99bf
Implement TODO list
aristath May 27, 2024
2731e31
Styling tweaks for todo list
aristath May 28, 2024
9fa97ef
fix vertical alignments
aristath May 28, 2024
a1bc283
style the (+) icon
aristath May 28, 2024
375b91a
remove top margin from todo list items
aristath May 28, 2024
b42e156
fix bottom border when editing existing item
aristath May 28, 2024
c14348c
Add missing permission_callback to REST API endpoint
aristath May 28, 2024
85ec3e4
remove debugging error_log
aristath May 28, 2024
390cb33
Reorder widgets
aristath May 28, 2024
6a5986c
Update strings after review with Marieke
jdevalk May 28, 2024
ba1e9b8
Skip saving auto-drafts
aristath May 29, 2024
a781415
Merge pull request #22 from Emilia-Capital/jdv/string-review
aristath May 29, 2024
6cc8ef0
Fix the plurals for weeks
jdevalk May 29, 2024
80868e2
Merge branch 'develop' into jdv/string-review
jdevalk May 29, 2024
5120178
Simplify TODO list in REST API response
aristath May 29, 2024
144f5ff
Merge pull request #23 from Emilia-Capital/jdv/string-review
aristath May 29, 2024
70d0011
remove watermark
aristath May 29, 2024
24e97d4
Change the checkbox tick
aristath May 29, 2024
1b5d28d
Remove Yoast ruleset
aristath May 29, 2024
9be9d61
CS fixes
aristath May 29, 2024
6a87461
Disable the "Todo" CS rule for now
aristath May 29, 2024
ac998ba
fix popover height to allow scrolling
aristath May 29, 2024
c71e9d7
Get Wonderful Writer badge faster
jdevalk May 29, 2024
ff0df05
String review part 3
jdevalk May 29, 2024
9e67689
tweak scores calculation
aristath May 30, 2024
fbd600e
tweak saving maintenance activities
aristath May 30, 2024
22f318a
Merge pull request #24 from Emilia-Capital/jdv/wonderful-writer-speedup
aristath May 30, 2024
affe209
Merge branch 'develop' into jdv/string-review-3
aristath May 30, 2024
414fba5
Merge pull request #25 from Emilia-Capital/jdv/string-review-3
aristath May 30, 2024
c088fb3
Additional checks
aristath May 31, 2024
8fb2ebc
Move the TODO widget
aristath May 31, 2024
2cfa3bf
Make what's new widget 2-columns and reorder widgets
aristath May 31, 2024
a4f2c2f
Reorder widgets
aristath May 31, 2024
a6710e2
Tweak styles for the what's new widget
aristath May 31, 2024
7a86ca1
Add featured images to what's new posts
aristath May 31, 2024
cd04fd7
Change capitalization standards
jdevalk Jun 2, 2024
7275859
Add GitHub -> WordPress.org deploy
jdevalk Jun 2, 2024
774cd23
Add plugin_url to the rest-api data
aristath Jun 3, 2024
e17ec1e
CS fix
aristath Jun 3, 2024
d7d4b9c
Merge pull request #28 from Emilia-Capital/jdv/add-worg-deploy
aristath Jun 3, 2024
ea77684
Merge pull request #27 from Emilia-Capital/jdv/string-review-3
aristath Jun 3, 2024
9fc6c89
Add wp.org header
jdevalk Jun 3, 2024
2c2f1ed
Update readme
jdevalk Jun 3, 2024
88b0e8f
Add TODO activities
aristath Jun 4, 2024
9b88077
reorder array items
aristath Jun 4, 2024
55241e6
Make string translatable & use the right function for escaping
aristath Jun 4, 2024
08d11d1
typo
aristath Jun 4, 2024
132c74b
Add dashboard widget for TODO list
aristath Jun 4, 2024
a72dd1e
Use latest-badge endpoint for images
aristath Jun 5, 2024
11bc26d
Add border
aristath Jun 5, 2024
7a2b054
URL changed
aristath Jun 5, 2024
47b4f17
Add ability to re-scan content
aristath Jun 5, 2024
bcf269d
Fix charts bug
aristath Jun 5, 2024
c8f4bf8
Change icons
aristath Jun 6, 2024
e9f61fe
Fix spacing & alignments
aristath Jun 6, 2024
cbd5d6c
Improve dashboard widgets
aristath Jun 6, 2024
6e7cba6
Further improve dashboard widgets
jdevalk Jun 6, 2024
4485310
Change to-do list dashboard widget title
jdevalk Jun 6, 2024
ee70aa0
Only add eventListener if element exists
aristath Jun 7, 2024
6bf0a1f
Tweaks for the what's new widget
aristath Jun 7, 2024
c8568d0
Add latest activities to dashboard widget
aristath Jun 7, 2024
e7734bc
CS
aristath Jun 7, 2024
e9c62cc
tweak streak widget
aristath Jun 7, 2024
98af93c
Remove cache from personal-record widget. Need to rethink this
aristath Jun 7, 2024
4e2b508
Add missing margin
aristath Jun 7, 2024
4851ab5
Add dates to activities in the dashboard widget
aristath Jun 7, 2024
a0b5d17
Reduce gaps in what's-new widget
aristath Jun 7, 2024
3b266c5
Style images in whats-new widget
aristath Jun 7, 2024
7a0b0fe
More CSS tweaks
aristath Jun 7, 2024
679e79b
Version 0.9 ready.
jdevalk Jun 7, 2024
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
24 changes: 24 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[*.yml]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[{*.txt,wp-config-sample.php}]
end_of_line = crlf
15 changes: 15 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.editorconfig export-ignore
.gitattributes export-ignore
.github/* export-ignore
tests/* export-ignore
.gitignore export-ignore
composer.json export-ignore
composer.lock export-ignore
package.json export-ignore
package-lock.json export-ignore
.wordpress-org/* export-ignore
phpcs.xml.dist export-ignore
phpstan.neon.dist export-ignore
phpunit.xml.dist export-ignore
README.md export-ignore
.wordpress-org/* export-ignore
68 changes: 68 additions & 0 deletions .github/workflows/cs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: CS

on:
# Run on all relevant pushes (except to main) and on all relevant pull requests.
push:
paths:
- '**.php'
- 'composer.json'
- 'composer.lock'
- '.phpcs.xml.dist'
- 'phpcs.xml.dist'
- '.github/workflows/cs.yml'
pull_request:
paths:
- '**.php'
- 'composer.json'
- 'composer.lock'
- '.phpcs.xml.dist'
- 'phpcs.xml.dist'
- '.github/workflows/cs.yml'
# Allow manually triggering the workflow.
workflow_dispatch:

# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
checkcs:
name: 'Check code style'
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
tools: cs2pr

# Validate the composer.json file.
# @link https://getcomposer.org/doc/03-cli.md#validate
- name: Validate Composer installation
run: composer validate --no-check-all

# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-composer-dependencies
- name: Install Composer dependencies
uses: ramsey/composer-install@v2
with:
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")

# Check the codestyle of the files.
# The results of the CS check will be shown inline in the PR via the CS2PR tool.
# @link https://github.com/staabm/annotate-pull-request-from-checkstyle/
- name: Check PHP code style
id: phpcs
run: composer check-cs -- --no-cache --report-full --report-checkstyle=./phpcs-report.xml

- name: Show PHPCS results in PR
if: ${{ always() && steps.phpcs.outcome == 'failure' }}
run: cs2pr ./phpcs-report.xml
18 changes: 18 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Deploy to WordPress.org"

on:
push:
tags:
- "v*"

jobs:
tag:
name: New tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@stable
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
69 changes: 69 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Lint

on:
# Run on pushes to select branches and on all pull requests.
push:
branches:
- main
- develop
- 'release/[0-9]+.[0-9]+*'
- 'hotfix/[0-9]+.[0-9]+*'
pull_request:
# Allow manually triggering the workflow.
workflow_dispatch:

# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest

strategy:
matrix:
# Lint against the highest/lowest supported versions of each PHP major.
# And also do a run against "nightly" (the current dev version of PHP).
php_version: ['7.4', '8.0', '8.1', '8.2']

name: "Lint: PHP ${{ matrix.php_version }}"

steps:
- name: Checkout code
uses: actions/checkout

- name: Install PHP for the composer install
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none

# The lint stage doesn't use code style, so no need for WPCS or phpcompatibility.
- name: 'Composer: adjust dependencies - remove PHPCompatibility'
run: composer remove --no-update --dev phpcompatibility/phpcompatibility-wp --no-scripts --no-interaction
- name: 'Composer: adjust dependencies - remove WPCS'
run: composer remove --no-update --dev wp-coding-standards/wpcs --no-scripts --no-interaction

# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-composer-dependencies
- name: Install Composer dependencies
uses: ramsey/composer-install@v2
with:
# Bust the cache at least once a month - output format: YYYY-MM-DD.
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")

- name: Install PHP for the actual test
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On
coverage: none
tools: cs2pr

- name: Lint against parse errors
run: composer lint -- --checkstyle | cs2pr

# - name: Lint blueprint file
# run: composer lint-blueprint
36 changes: 36 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Run PHPStan

on:
# Run on pushes to select branches and on all pull requests.
push:
branches:
- main
- develop
- 'release/[0-9]+.[0-9]+*'
- 'hotfix/[0-9]+.[0-9]+*'
pull_request:
# Allow manually triggering the workflow.
workflow_dispatch:

jobs:
phpstan:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 'latest'
coverage: none
tools: composer, cs2pr

- name: Install PHP dependencies
uses: ramsey/composer-install@v2
with:
composer-options: '--prefer-dist --no-scripts'

- name: PHPStan
run: composer phpstan
90 changes: 90 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Test

on:
# Run on pushes to select branches and on all pull requests.
push:
pull_request:
# Allow manually triggering the workflow.
workflow_dispatch:

# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
integration:
runs-on: ubuntu-latest

strategy:
matrix:
include:
- php_version: '8.1'
wp_version: '6.2'
multisite: false

- php_version: '8.1'
wp_version: 'latest'
multisite: false

- php_version: '8.1'
wp_version: 'latest'
multisite: true

- php_version: '8.2'
wp_version: 'latest'
multisite: true

name: "Integration Test: PHP ${{ matrix.php_version }} | WP ${{ matrix.wp_version }}${{ matrix.multisite == true && ' (+ ms)' || '' }}"

# Allow builds to fail on as-of-yet unreleased WordPress versions.
continue-on-error: ${{ matrix.wp_version == 'trunk' }}

services:
mysql:
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: false
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=10s --health-retries=10

steps:
- name: Checkout code
uses: actions/checkout

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On
coverage: none

# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-composer-dependencies
- name: "Composer: remove the PHP platform requirement"
run: composer config --unset platform.php

- name: "Install Composer dependencies"
uses: ramsey/composer-install@v2
with:
# Force a `composer update` run.
dependency-versions: "highest"
# But make it selective.
composer-options: "yoast/wp-test-utils --with-dependencies"
# Bust the cache at least once a month - output format: YYYY-MM-DD.
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")

- name: Install WP
shell: bash
run: tests/bin/install-wp-tests.sh wordpress_tests root '' 127.0.0.1:3306 ${{ matrix.wp_version }}

- name: Run unit tests - single site
run: composer test

- name: Run unit tests - multisite
if: ${{ matrix.multisite == true }}
run: composer test
env:
WP_MULTISITE: 1
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/vendor/
._*
.phpunit.result.cache
node_modules
Binary file added .wordpress-org/banner-1544x500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/banner-772x250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions .wordpress-org/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
# progress-planner
Progress Planner helps you track your website statistics and rewards you with badges when you're doing well!

## Branches on this repository

We use a couple of branches in this repository to keep things clean:

- `develop` contains the current state of development.
- `main` contains the current stable release. Releases here will be tagged as such.
Loading