Commit Graph

28 Commits

Author SHA1 Message Date
Roy Ho 16386238cc
Add minimum required permissions for workflow token (#36200)
* Add minimum required permissions to e2e-tests

* Add minimum token permission to more workflows
2023-01-02 09:28:11 -08:00
Roy Ho aa96739964
Add s flag to show sniff codes (#35802) 2022-12-05 06:21:26 -08:00
Paul Sealock 19f0410bc1
PHPCS: Lint only changes (#35407)
Add `sirbrillig/phpcs-changed` to run PHPCS only on changes, not entire files
2022-11-01 07:53:01 +13:00
Sam Seay 197c43e557
Remove phpcs Github action in favor of running phpcs directly (#35237) 2022-10-25 20:17:38 +13:00
Christopher Allford a49f23abfd
Optimize Workflow Caching (#34607)
* Added Monorepo Setup Action

This action will handle the installation, building, and caching for all
projects within the monorepo. It has inputs for skipping builds and
filtering so that only specific packages are installed and built.

* Removed Test Caching

Caching the results of tests, while an interesting way to avoid
unnecessary execution, seems error-prone. We can't adequately
capture the environment such that we can rely on this working.
For instance, changes in PHP version might break PHPUnit tests,
but, cached runs will be shared across different workflows.

It seems better to just not cache it and rely on people only testing
code that has actually changed in the pull request.

* Added Input Parsing

This SHOULD allow for passing multiple filters as an array argument.

* Updated Workflows

This fully utilizes the new action across all of the workflows.

* Always Cache Build Output

Since there may be other commands run that populate the cache, we
should make sure that we are always caching just in case.
2022-09-13 13:55:03 +12:00
louwie17 383c96f0ca
Update woocommerce admin scripts to align more with turborepo (#33982)
* Update woocommerce admin scripts to align more with monorepo

* Add changelog

* Add dev script back in

* Add install-if-deps-outdated back into build script

* Remove --force from dev script and add WC_ADMIN_PHASE to turbo cache key

* Remove install-if-deps-outdated from build

* Add composer install step to pr unit tests workflow

* Remove old install scripts, that are not needed anymore

* Make sure client changes are part of the cache hit

* Add composer install to code coverage and code sniff as well

* Add composer_no_dev input to install-build workflow

* Add sass dependency to woocommerce/admin/client turbo cache
2022-07-22 08:32:03 -03:00
Roy Ho 14066bdeae
Add phpcs-changed (#33584)
* Add phpcs-changed

* Put report flag value in quotes

* Use phpcs action workflow instead

* Remove no longer used phpcs script

* Remove phpcs ignore rule

* Use proper name for code sniffer step
2022-06-27 11:46:29 -07:00
roykho 1042f22cf8
Extract cache and build to rest of workflows 2022-05-17 11:48:24 -07:00
roykho dbc86cb89e
Revert phpcs changes 2022-05-17 08:40:39 -07:00
roykho dac4993295
Try fetch-depth 2 on PHPCS 2022-05-17 08:32:33 -07:00
roykho 08892b3d9f
Test code sniff fetch depth 1 2022-05-17 08:27:47 -07:00
roykho 7056cf93b6
Add additional pnpm cache dir 2022-05-16 06:01:53 -07:00
roykho cf5c47eb09
Cache Composer global store 2022-05-13 13:43:33 -07:00
roykho ab58263e80
Add unique secrets cache key to enable clearing of cache 2022-05-04 15:20:31 -07:00
roykho 45a036f35b
Match minor and patch 2022-05-02 10:08:52 -07:00
roykho f2e4a686f1
Lock pnpm to specific version 2022-05-02 09:39:40 -07:00
roykho 57c1c0bc1c
Freeze Ubuntu release to 20.04 for best practice and consistency 2022-04-26 18:28:56 -07:00
roykho fc705cff77
Use glob pattern for hash key 2022-04-26 07:47:50 -07:00
roykho bd096a6edc
Use glob pattern to cache multiple nested Composer vendor paths 2022-04-26 07:07:15 -07:00
roykho bd23093c42
Refactor caching for workflows 2022-04-21 09:45:12 -07:00
Chi-Hsuan Huang eb4c0a751e Add Cancel Previous Runs step to pr-* github actions 2022-03-29 11:53:58 +08:00
roykho f15f75e9cf
No need to install Nx globally 2021-11-17 08:54:14 -08:00
roykho bf2efa492a
Use Nx for code sniff action 2021-11-16 19:06:22 -08:00
roykho 2193082c01 Add default working directory 2021-10-19 10:35:46 +13:00
Claudio Sanches 75ed94bd38 Fixed PHPCS run and added cs2pr support 2021-03-13 21:01:21 -03:00
Claudio Sanches e0040a1a4e Remove mysql from code sniff workflow 2021-03-13 19:42:06 -03:00
vedanshujain 8963755442 Use bash instead of sh 2021-02-09 16:15:48 +05:30
vedanshujain 3e0fc5e89b Add CI for code coverage and code sniff on GitHub actions. 2021-02-09 16:09:56 +05:30