Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
388 commits
Select commit Hold shift + click to select a range
b41de1c
Merge pull request #260 from codesnippetspro/sticky-sidebar
imantsk Oct 8, 2025
62109a8
feat: enhance versioning logic for beta and regular releases
imantsk Oct 8, 2025
39d75f0
Merge pull request #246 from codesnippetspro/feat--Adjustable-font-si…
sheabunge Oct 9, 2025
a6e34d6
Fix linting warnings.
sheabunge Oct 9, 2025
4a3904b
fix: update artifact name output to use zip step's name
imantsk Oct 9, 2025
0f02533
feat: add PHP version input
imantsk Oct 9, 2025
381bdf9
fix: update artifact download step to use artifact ID instead of name
imantsk Oct 9, 2025
450c137
fix: Playwright job steps
imantsk Oct 9, 2025
a08c99e
fix: dependency caching in Playwright workflow
imantsk Oct 9, 2025
af81222
fix: update Node.js setup to use version file and configure PHP version
imantsk Oct 9, 2025
62884c2
fix: update cache path for vendor directory in Playwright workflow
imantsk Oct 9, 2025
b65ecfc
fix: createPageWithShortcode command to use array join
imantsk Oct 9, 2025
dab0709
fix: update PHP setup and artifact upload paths in build workflow
imantsk Oct 9, 2025
e0edbd7
fix: update release workflow
imantsk Oct 9, 2025
b72b791
Merge branch 'core' into flat-file
louiswol94 Oct 9, 2025
f384c78
file bases E2E tests
louiswol94 Oct 9, 2025
347abe7
update playwright command
louiswol94 Oct 9, 2025
c331651
fix playwright storage state
louiswol94 Oct 9, 2025
555bb31
clear opcache cache on save
louiswol94 Oct 9, 2025
0d36e23
eslint fix
louiswol94 Oct 9, 2025
73672e2
fix e2e test snippet for list page tests
louiswol94 Oct 9, 2025
819f7c0
reusable playwright workflow
louiswol94 Oct 9, 2025
1df506b
remove debug steps from playwright workflow
louiswol94 Oct 9, 2025
3e4a082
add workflow permissions
louiswol94 Oct 9, 2025
350ba54
remove permissions
louiswol94 Oct 9, 2025
8187aab
remove permissions
louiswol94 Oct 9, 2025
8a99a55
fix: add inputs for changelog, readme paths, and model in prepare-tag…
imantsk Oct 10, 2025
289d0c7
fix: update tag computation logic in prepare-tag workflow
imantsk Oct 10, 2025
fed7dd7
fix: update workflow reference for tag computation
imantsk Oct 10, 2025
c0d48aa
fix: add branches for tag creation in workflow
imantsk Oct 10, 2025
546762b
fix: update workflow name
imantsk Oct 10, 2025
3d4ba1f
fix: remove unused inputs
imantsk Oct 10, 2025
9ca1442
fix: version job and update version output handling
imantsk Oct 11, 2025
64b4f14
fix: update file path for version job to use package.json
imantsk Oct 11, 2025
6bf4275
fix: regex for versioning
imantsk Oct 11, 2025
dff1e44
fix: update version handling in prepare-tag workflow
imantsk Oct 11, 2025
e6436ae
fix: ensure changelog job runs
imantsk Oct 11, 2025
17a3892
feat(sync): add repos synchronization workflow
imantsk Oct 11, 2025
5272b5a
feat(sync): added Carolina and Louis as plugin contributors
imantsk Oct 14, 2025
67d6d1f
wip: trash feature
louiswol94 Oct 15, 2025
a61cdb8
wip: different bulk actions for trashed items
louiswol94 Oct 15, 2025
2477a42
wip: improve result messages
louiswol94 Oct 15, 2025
cbf1d8f
wip: snippet title should not be a link to edit on trashed page
louiswol94 Oct 15, 2025
1ddd6fc
wip: hide activation switch on trashed page
louiswol94 Oct 15, 2025
1020778
wip: remove background color on trashed pages
louiswol94 Oct 15, 2025
afd294e
wip
louiswol94 Oct 15, 2025
1680b33
Merge remote-tracking branch 'origin/core/core-beta' into flat-file
imantsk Oct 16, 2025
79b0e56
Merge remote-tracking branch 'origin/core/core-beta' into feat/versio…
imantsk Oct 16, 2025
5e45f11
fix: refactor version switch JS
imantsk Oct 16, 2025
99a7ec6
feat: add debug option to enable version change section
imantsk Oct 16, 2025
616f251
fix: update version switch integration to use class-based implementation
imantsk Oct 16, 2025
964da43
chore: remove unnecessary code
imantsk Oct 16, 2025
2741138
fix: notice styles
imantsk Oct 16, 2025
b87a530
Merge pull request #258 from codesnippetspro/flat-file
imantsk Oct 16, 2025
fe2577d
Merge remote-tracking branch 'origin/core/core-beta' into soft-delete
imantsk Oct 16, 2025
9e0c194
Merge remote-tracking branch 'origin/core/core-beta' into fix/misc-bu…
imantsk Oct 16, 2025
c4ef01f
Merge pull request #248 from codesnippetspro/fix/misc-bug-fixes
code-snippets-bot Oct 16, 2025
fe9754f
chore(release): update changelog for v3.7.1-beta.1
code-snippets-bot Oct 16, 2025
4c174da
chore(release): update readme for v3.7.1-beta.1
code-snippets-bot Oct 16, 2025
9849128
chore(release): bump version to v3.7.1-beta.1
code-snippets-bot Oct 16, 2025
ccfedd1
fix: changelog
code-snippets-bot Oct 16, 2025
7a5b4c8
chore(release): update changelog for v3.7.1-beta.1
code-snippets-bot Oct 16, 2025
50c8cbc
chore(release): update readme for v3.7.1-beta.1
code-snippets-bot Oct 16, 2025
19b53ef
fix: changelog
code-snippets-bot Oct 16, 2025
f11817b
Merge pull request #262 from codesnippetspro/tag/v3.7.1-beta.1
code-snippets-bot Oct 16, 2025
a29c76f
fix(sync): tag creation process
imantsk Oct 16, 2025
6923968
Merge branch 'core' into core-beta
code-snippets-bot Oct 16, 2025
9b7be69
fix(sync): tag creation process
imantsk Oct 16, 2025
4b0df8a
Merge branch 'core' into core-beta
code-snippets-bot Oct 16, 2025
66543b8
fix: changelog
imantsk Oct 16, 2025
4c67b56
Merge pull request #263 from codesnippetspro/tag/v3.7.1-beta.1
code-snippets-bot Oct 16, 2025
346c70e
fix(sync): update action-gh-release to codesnippetspro version
imantsk Oct 16, 2025
236dea7
Merge branch 'core' into core-beta
code-snippets-bot Oct 16, 2025
e78d664
fix: changelog
imantsk Oct 16, 2025
fa4261f
Merge remote-tracking branch 'origin/core/core-beta' into tag/v3.7.1-…
imantsk Oct 16, 2025
ef425c8
Merge pull request #264 from codesnippetspro:tag/v3.7.1-beta.1
imantsk Oct 16, 2025
156d62b
CR
louiswol94 Oct 21, 2025
ea55759
Merge branch 'soft-delete' of https://github.com/codesnippetspro/code…
louiswol94 Oct 21, 2025
e39cb34
fix: correct version number in plugin header
imantsk Oct 21, 2025
0089f9b
Merge pull request #265 from codesnippetspro:fix/verions-nr
imantsk Oct 21, 2025
a698ecc
chore(release): bump version to v3.7.1-beta.1
code-snippets-bot Oct 21, 2025
e86b599
fix: version nr
imantsk Oct 21, 2025
93e66de
wip: snippet files to handle trash action
louiswol94 Oct 21, 2025
7bd15a0
fix: double empty line
imantsk Oct 21, 2025
80e3118
fix: changelog
imantsk Oct 21, 2025
cef726a
wip: snippet files to handle trash action
louiswol94 Oct 21, 2025
aba2e21
Merge pull request #266 from codesnippetspro/tag/v3.7.1-beta.1
imantsk Oct 21, 2025
53ac5ee
wip: add trash undo options
louiswol94 Oct 21, 2025
a104e07
update delete label in bulk actions
louiswol94 Oct 21, 2025
28a1778
wip: update trash label
louiswol94 Oct 21, 2025
8ca4a1b
fix: revert stable tag to 3.7.0
imantsk Oct 22, 2025
1730854
fix: conditionally update stable tag based on version type
imantsk Oct 22, 2025
cad3888
chore(release): bump version to v3.7.1-beta.1
code-snippets-bot Oct 22, 2025
55335e0
fix: version nr
imantsk Oct 22, 2025
2f606b6
Merge pull request #267 from codesnippetspro/tag/v3.7.1-beta.1
imantsk Oct 22, 2025
8c0b606
Merge pull request #251 from codesnippetspro/feat/version-switch
imantsk Oct 22, 2025
54fd5bd
chore(release): update changelog for v3.7.1-beta.2
code-snippets-bot Oct 22, 2025
5186122
chore(release): update readme for v3.7.1-beta.2
code-snippets-bot Oct 22, 2025
5a0c342
chore(release): bump version to v3.7.1-beta.2
code-snippets-bot Oct 22, 2025
9c468a3
fix: changelog
imantsk Oct 22, 2025
449b0da
fix: version
imantsk Oct 22, 2025
30b6276
Merge pull request #268 from codesnippetspro/tag/v3.7.1-beta.2
imantsk Oct 22, 2025
502965d
test: add REST API pagination test for snippets
imantsk Oct 22, 2025
fb9de70
fix: pagination support to snippets REST API endpoint
imantsk Oct 22, 2025
811be0b
fix: stylelint
imantsk Oct 22, 2025
df8af7b
fix: get_items method to support pagination
imantsk Oct 22, 2025
93c700a
fix: remove unused file
imantsk Oct 22, 2025
c0aa1a7
fix(copilot): comment style
imantsk Oct 22, 2025
ff72886
fix: improve pagination
imantsk Oct 22, 2025
1eb7967
Merge pull request #269 from codesnippetspro/fix/rest-api-pagination
imantsk Oct 22, 2025
e384432
chore(release): update changelog for v3.7.1-beta.3
code-snippets-bot Oct 22, 2025
c7d9c10
chore(release): update readme for v3.7.1-beta.3
code-snippets-bot Oct 22, 2025
e1e1269
chore(release): bump version to v3.7.1-beta.3
code-snippets-bot Oct 22, 2025
27a80f2
fix: changelog
imantsk Oct 22, 2025
95af256
fix: version
imantsk Oct 22, 2025
66cc3f9
Merge pull request #271 from codesnippetspro/tag/v3.7.1-beta.3
imantsk Oct 22, 2025
a81b4f2
Merge pull request #272 from codesnippetspro/core-beta
imantsk Oct 24, 2025
b251c21
chore(release): update changelog for v3.8.0
code-snippets-bot Oct 24, 2025
bf689af
chore(release): update readme for v3.8.0
code-snippets-bot Oct 24, 2025
2d1c46e
chore(release): bump version to v3.8.0
code-snippets-bot Oct 24, 2025
83451bd
chore(release): fix changelog
imantsk Oct 24, 2025
90e124e
Update CHANGELOG.md
sheabunge Oct 24, 2025
5a9d824
release(sync): Merge pull request #273 from codesnippetspro/tag/v3.8.0
imantsk Oct 24, 2025
b095be4
fix: improve flat files handling on multisite
louiswol94 Oct 27, 2025
8254564
fix: improve file based handling on multisite
louiswol94 Oct 27, 2025
ddbf2dc
fix(sync): Merge pull request #276 from codesnippetspro/fix-flat-file…
code-snippets-bot Oct 28, 2025
bcb2e12
chore(release): update changelog for v3.8.1
code-snippets-bot Oct 28, 2025
4a7cee8
chore(release): update readme for v3.8.1
code-snippets-bot Oct 28, 2025
4637730
chore(release): bump version to v3.8.1
code-snippets-bot Oct 28, 2025
6164694
fix: changelog
code-snippets-bot Oct 28, 2025
7f2816d
Merge pull request #277 from codesnippetspro/tag/v3.8.1
code-snippets-bot Oct 28, 2025
e32ce9d
fix: sync changelog
imantsk Oct 28, 2025
d4c350c
fix: improve file based execution with namespaced PHP snippets
louiswol94 Oct 29, 2025
37646e3
Refactor wrap_code to apply filters before concatenation
louiswol94 Oct 29, 2025
228a5c1
fix: improve file based execution with namespaced php snippets
louiswol94 Oct 30, 2025
c8fd032
Merge branch 'core-beta' into manage-refresh/core
sheabunge Oct 31, 2025
1377fae
Convert new functionality to be PSR-compliant.
sheabunge Oct 31, 2025
4f97f82
chore(release): update changelog for v3.8.2
code-snippets-bot Oct 31, 2025
bd86638
chore(release): update readme for v3.8.2
code-snippets-bot Oct 31, 2025
a47f627
chore(release): bump version to v3.8.2
code-snippets-bot Oct 31, 2025
11cbf46
fix: changelog
code-snippets-bot Oct 31, 2025
18d4a13
Merge pull request #280 from codesnippetspro/tag/v3.8.2
code-snippets-bot Oct 31, 2025
0a6b1a7
Merge pull request #261 from codesnippetspro/soft-delete
imantsk Oct 31, 2025
1f5a230
fix: raise ecma version from 2018 to 2022
ramiy Nov 3, 2025
8259481
fix: use logical properties
ramiy Nov 3, 2025
6f0fd9e
chore(release): update changelog for v3.9.0-beta.1
code-snippets-bot Nov 3, 2025
2d1c1df
chore(release): update readme for v3.9.0-beta.1
code-snippets-bot Nov 3, 2025
5bc254c
chore(release): bump version to v3.9.0-beta.1
code-snippets-bot Nov 3, 2025
5b8d4af
Merge pull request #282 from codesnippetspro/fix/ecma-version
code-snippets-bot Nov 3, 2025
065a445
Merge pull request #283 from codesnippetspro/fix/logical-properties
code-snippets-bot Nov 3, 2025
0029afa
Merge branch 'core/core-beta' into core/tag/v3.9.0-beta.1
imantsk Nov 3, 2025
cbbc9f7
fix: use logical properties
ramiy Nov 3, 2025
65ce92f
Merge pull request #285 from codesnippetspro/fix/logical-properties-fix
ramiy Nov 3, 2025
888c2d2
fix: changelog
imantsk Nov 3, 2025
d0de15f
fix: verison nr
imantsk Nov 3, 2025
c566ced
Merge pull request #284 from codesnippetspro/tag/v3.9.0-beta.1
code-snippets-bot Nov 3, 2025
e21fc92
fix: use consistent media queries
ramiy Nov 3, 2025
bb5a5b2
Update Browsers Support
ramiy Nov 4, 2025
278af8a
fix: tooltip usage and styling
imantsk Nov 4, 2025
cb5ca1f
Organize lint scripts
ramiy Nov 4, 2025
9fd8531
fix: update checkbox checked state logic in MultisiteSharingSettings
imantsk Nov 4, 2025
95d81b2
fix: include shared_network in mapToSchema for snippet API
imantsk Nov 4, 2025
675bd45
fix: merge shared network snippets in get_items method
imantsk Nov 4, 2025
807e3bd
fix: update shared network snippet handling and styling in List_Table…
imantsk Nov 4, 2025
d0effba
fix: Update _badges.scss
imantsk Nov 5, 2025
7908f8b
fix: cache issues on settings page
louiswol94 Nov 5, 2025
e30a6fd
Update settings.php
louiswol94 Nov 5, 2025
9a0f70c
Apply suggestion from @louiswol94
ramiy Nov 5, 2025
78b15c9
naming convention
ramiy Nov 6, 2025
f033f1d
fix: revert line-height in badge styles
imantsk Nov 6, 2025
0f5aac5
fix: file based snippets do not handle fatal errors
louiswol94 Nov 6, 2025
1f9416c
Merge pull request #291 from codesnippetspro/louiswol94-patch-2
louiswol94 Nov 6, 2025
60a68db
fix: correct network condition check and streamline snippet fetching
imantsk Nov 6, 2025
75b89fe
fix: indentation
imantsk Nov 6, 2025
e405b7a
chore: composer upgrade
imantsk Nov 6, 2025
7bc08c5
fix: add support for shared network snippets and improve status labels
imantsk Nov 6, 2025
435c455
feat: update badge styles for network snippets and adjust color in ro…
imantsk Nov 6, 2025
2e4a11a
feat: add network snippets management capabilities and subsite menu c…
imantsk Nov 6, 2025
ef94d56
feat: add "Snippets" row action to the Network Sites table
imantsk Nov 7, 2025
6da6687
fix: improve snippet name visibility for network users
imantsk Nov 7, 2025
3e0feeb
fix: enhance badge styles for row actions and improve pro badge hover…
imantsk Nov 7, 2025
305b858
fix: update selector for active snippet name styling
imantsk Nov 7, 2025
2d3dac6
Merge pull request #286 from codesnippetspro/fix/media-queries
ramiy Nov 9, 2025
93fff7d
Merge pull request #288 from codesnippetspro/lint
ramiy Nov 9, 2025
042ddd1
Update Browsers Support
ramiy Nov 9, 2025
6020f8f
Merge pull request #290 from codesnippetspro/louiswol94-patch-1
imantsk Nov 10, 2025
88cf042
Merge branch 'core/core-beta' into fix/share-with-subsites
imantsk Nov 10, 2025
1a89a7f
Merge pull request #289 from codesnippetspro/fix/share-with-subsites
imantsk Nov 10, 2025
6c1ba6a
chore(release): update changelog for v3.9.0-beta.2
code-snippets-bot Nov 10, 2025
eac464f
chore(release): update readme for v3.9.0-beta.2
code-snippets-bot Nov 10, 2025
6489830
chore(release): bump version to v3.9.0-beta.2
code-snippets-bot Nov 10, 2025
272a061
fix: changelog
code-snippets-bot Nov 10, 2025
3edd120
fix: changelog
code-snippets-bot Nov 10, 2025
087881c
fix: changelog
code-snippets-bot Nov 10, 2025
7c8a083
Merge pull request #293 from codesnippetspro/tag/v3.9.0-beta.2
code-snippets-bot Nov 10, 2025
6ca0be0
fix: pagination in rest api
louiswol94 Nov 11, 2025
1554996
Merge pull request #295 from codesnippetspro/louiswol94-patch-1
louiswol94 Nov 11, 2025
b3e6ebb
fix: pagination in rest api
louiswol94 Nov 11, 2025
fb8c0e3
Merge pull request #296 from codesnippetspro/louiswol94-patch-3
louiswol94 Nov 12, 2025
8c04498
Migrate to native CSS direction management
ramiy Nov 13, 2025
ffd8299
Fix "code direction" position
ramiy Nov 13, 2025
138941d
Merge pull request #297 from codesnippetspro/core-beta
imantsk Nov 13, 2025
4edf08a
chore(release): update changelog for v3.9.0
code-snippets-bot Nov 13, 2025
91d2a28
chore(release): update readme for v3.9.0
code-snippets-bot Nov 13, 2025
8db8522
chore(release): bump version to v3.9.0
code-snippets-bot Nov 13, 2025
0b2999f
fix: remove extra newline
imantsk Nov 13, 2025
c539b03
fix: improve build workflow concurrency and artifact naming
imantsk Nov 13, 2025
8dd0170
Merge branch 'core/core' into core/tag/v3.9.0
imantsk Nov 13, 2025
1691d2d
Merge pull request #300 from codesnippetspro/tag/v3.9.0
imantsk Nov 13, 2025
8f86319
Merge pull request #299 from codesnippetspro/code-direction
sheabunge Nov 13, 2025
addfb78
Merge pull request #298 from codesnippetspro/rtl
sheabunge Nov 13, 2025
90de761
Merge branch 'core/core' into core/core-beta
imantsk Nov 13, 2025
1d7debf
chore: update dependencies
imantsk Nov 14, 2025
a96bef0
fix: TinyMCE menu button registration
imantsk Nov 14, 2025
ead376e
chore(release): update changelog for v3.9.1
code-snippets-bot Nov 14, 2025
0b02cfa
chore(release): update readme for v3.9.1
code-snippets-bot Nov 14, 2025
3bd8d72
chore(release): bump version to v3.9.1
code-snippets-bot Nov 14, 2025
d2a6a18
fix: changelog
imantsk Nov 14, 2025
efd3df5
Merge pull request #301 from codesnippetspro/tag/v3.9.1
imantsk Nov 14, 2025
d29621f
Merge branch 'core-beta' into manage-refresh/core
sheabunge Nov 14, 2025
27fe56b
Change tested up to version from 6.8.2 to 6.8
ramiy Nov 14, 2025
5f7ae9f
Fix JSON indentation.
sheabunge Nov 14, 2025
9cd098e
Fix JSON indentation.
sheabunge Nov 14, 2025
c6ef380
Merge branch 'core-beta' into manage-refresh/core
sheabunge Nov 14, 2025
d668820
fix: remove .browserslistrc file
imantsk Nov 16, 2025
ec7bcca
feat: add custom scissors icon to code snippets plugin and button title
imantsk Nov 16, 2025
51865f8
fix: ensure 'enable_flat_files' setting is included in default settings
imantsk Nov 16, 2025
5856d7c
fix: improve setting sanitization logic in sanitize_settings function
imantsk Nov 16, 2025
98965b8
fix: prevent vendor namespace collisions by removing non-prefixed map…
imantsk Nov 16, 2025
6846c57
feat: add psr-4 autoload configuration placeholder
imantsk Nov 16, 2025
ab27ae9
docs: add guidelines for managing Composer dependencies to prevent co…
imantsk Nov 16, 2025
a72d08b
feat: add back navigation styling to edit page
imantsk Nov 16, 2025
0b15874
fix: enhance styling for cloud related elements
imantsk Nov 16, 2025
c6f7141
fix: improve pagination and snippet fetching in cloud search list table
imantsk Nov 16, 2025
050ba7d
fix: normalize cloud API payloads in Cloud_Snippets constructor
imantsk Nov 16, 2025
18276f7
fix: update variable name for clarity in fetch_search_results method
imantsk Nov 16, 2025
fd80caa
Merge pull request #302 from codesnippetspro/tested-up-to-version
imantsk Nov 16, 2025
fc13b6d
fix: adjust layout for column names and action buttons in cloud snippets
imantsk Nov 16, 2025
fce3d06
fix: standardize indentation
imantsk Nov 16, 2025
5c803d6
fix: standardize indentation
imantsk Nov 16, 2025
bb30323
fix: correct typo in comment and sanitize pagination output
imantsk Nov 16, 2025
7e92ad0
Merge pull request #304 from codesnippetspro/fix/tinymce-plugin-issue
louiswol94 Nov 17, 2025
5af0b64
chore(release): update changelog for v3.9.2
code-snippets-bot Nov 17, 2025
497ede2
chore(release): update readme for v3.9.2
code-snippets-bot Nov 17, 2025
dcbd123
chore(release): bump version to v3.9.2
code-snippets-bot Nov 17, 2025
4aeac4c
Revise release notes for version 3.9.2
louiswol94 Nov 17, 2025
af12474
Revise CHANGELOG for version 3.9.2
louiswol94 Nov 17, 2025
7a452a1
fix: changelog
imantsk Nov 17, 2025
2a8dcc6
Merge pull request #305 from codesnippetspro/tag/v3.9.2
imantsk Nov 17, 2025
680a2fb
Merge branch 'core' into manage-refresh/core
sheabunge Nov 18, 2025
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: 19 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,28 @@ on:
required: false
type: string
default: ${{ inputs.ref }}
php:
required: false
type: number
default: 8.3

outputs:
version:
value: ${{ jobs.build.outputs.version }}
artifact_name:
value: ${{ jobs.build.outputs.artifact_name }}
artifact_url:
value: ${{ jobs.build.outputs.artifact_url }}
artifact_id:
value: ${{ jobs.build.outputs.artifact_id }}
jobs:
build:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.build.outputs.version }}
artifact_name: ${{ steps.build.outputs.name }}
artifact_url: ${{ steps.artifacts.outputs.artifact-url }}
version: ${{ steps.build.outputs.version }}
artifact_id: ${{ steps.artifacts.outputs.artifact-id }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -29,23 +37,29 @@ jobs:
- name: Set up PHP
uses: codesnippetspro/setup-php@v2
with:
php-version: "8.3"
php-version: "${{ inputs.php }}"

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: 'npm'

- name: Install & Build
id: build
run: |
npm install && npm run bundle
echo "name=$(jq -r .name package.json)" >> $GITHUB_OUTPUT
echo "version=$(jq -r .version package.json)" >> $GITHUB_OUTPUT

name=$(jq -r .name package.json)
echo "name=$name" >> $GITHUB_OUTPUT
echo "version=$(jq -r .version package.json)" >> $GITHUB_OUTPUT

mkdir -p ./upload/$name
mv ./bundle/* ./upload/$name/ 2>/dev/null || true

- name: Upload
id: artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ steps.build.outputs.name }}
path: ./bundle
path: ./upload
12 changes: 7 additions & 5 deletions .github/workflows/create-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,27 @@ on:
types: [closed]
branches:
- core

- core-beta
- pro
- pro-beta
jobs:
create-tag:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'tag/v')
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
ref: core

- name: Get version from package.json
id: version
run: |
echo "tag=$(jq -r .version package.json)" >> $GITHUB_OUTPUT
tag=$(jq -r .version package.json)
echo "tag=$tag" >> $GITHUB_OUTPUT
echo "::info::Creating git tag [$tag]"

- name: Create tag
run: |
git config user.name "code-snippets-bot"
git config user.email "sre@codesnippets.pro"
git config user.email "139164393+code-snippets-bot@users.noreply.github.com"
git tag "v${{ steps.version.outputs.tag }}"
git push origin "v${{ steps.version.outputs.tag }}"
104 changes: 104 additions & 0 deletions .github/workflows/playwright-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Playwright Test Runner

on:
workflow_call:
inputs:
test-mode:
required: true
type: string
description: 'Test mode: default or file-based-execution'
project-name:
required: true
type: string
description: 'Playwright project name to run'

jobs:
playwright-test:
name: Playwright tests (${{ inputs.test-mode == 'default' && 'Default Mode' || 'File-based Execution' }})
runs-on: ubuntu-22.04
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Set up PHP
uses: codesnippetspro/setup-php@v2
with:
php-version: "8.1"

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: 'npm'

- name: Compute dependency hash
id: deps-hash
run: |
set -euo pipefail
tmpfile=$(mktemp)
for f in src/composer.lock package-lock.json; do
if [ -f "$f" ]; then
cat "$f" >> "$tmpfile"
fi
done
if [ -s "$tmpfile" ]; then
deps_hash=$(shasum -a 1 "$tmpfile" | awk '{print $1}' | cut -c1-8)
else
deps_hash=$(echo "${GITHUB_SHA:-unknown}" | cut -c1-8)
fi
echo "deps_hash=$deps_hash" >> "$GITHUB_OUTPUT"

- name: Get build cache
id: deps-cache
uses: actions/cache/restore@v4
with:
path: |
node_modules
src/vendor
key: ${{ runner.os }}-deps-${{ steps.deps-hash.outputs.deps_hash }}
restore-keys: |
${{ runner.os }}-deps-

- name: Install workflow dependencies (wp-env, playwright)
if: steps.deps-cache.outputs.cache-hit != 'true'
run: npm run prepare-environment:ci && npm run bundle

- name: Save vendor and node_modules cache
if: steps.deps-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
src/vendor
node_modules
key: ${{ runner.os }}-deps-${{ steps.deps-hash.outputs.deps_hash }}

- name: Start WordPress environment
run: |
npx wp-env start

- name: Activate code-snippets plugin
run: npx wp-env run cli wp plugin activate code-snippets

- name: WordPress debug information
run: |
npx wp-env run cli wp core version
npx wp-env run cli wp --info

- name: Install playwright/test
run: |
npx playwright install chromium

- name: Run Playwright tests
run: npm run test:playwright -- --project=${{ inputs.project-name }}

- name: Stop WordPress environment
if: always()
run: npx wp-env stop

- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-test-results-${{ inputs.test-mode }}
path: test-results/
if-no-files-found: ignore
retention-days: 2
54 changes: 54 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: "(Test): Playwright"

on:
pull_request:
types: [labeled, synchronize, opened, reopened]
push:
branches:
- 'core'
- 'pro'
paths-ignore:
- '**.md'
- '**.txt'
- '.gitignore'
- 'docs/**'
workflow_dispatch:

permissions:
contents: write
pull-requests: write
actions: read

concurrency:
group: playwright-${{ github.event_name }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
playwright-default:
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-tests')
uses: ./.github/workflows/playwright-test.yml
with:
test-mode: 'default'
project-name: 'chromium-db-snippets'

playwright-file-based-execution:
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-tests')
uses: ./.github/workflows/playwright-test.yml
with:
test-mode: 'file-based-execution'
project-name: 'chromium-file-based-snippets'

test-result:
needs: [playwright-default, playwright-file-based-execution]
if: always() && (needs.playwright-default.result != 'skipped' || needs.playwright-file-based-execution.result != 'skipped')
runs-on: ubuntu-22.04
name: Playwright - Test Results Summary
steps:
- name: Test status summary
run: |
echo "Default Mode: ${{ needs.playwright-default.result }}"
echo "File-based Execution: ${{ needs.playwright-file-based-execution.result }}"

- name: Check overall status
if: ${{ (needs.playwright-default.result != 'success' && needs.playwright-default.result != 'skipped') || (needs.playwright-file-based-execution.result != 'success' && needs.playwright-file-based-execution.result != 'skipped') }}
run: exit 1
Loading