-
Couldn't load subscription status.
- Fork 31
Replace Travis CI with GitHub actions #1086
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
Changes from all commits
b262935
683ce97
2725e57
9f9249b
f562ee3
89a40c6
08813aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| php-version: [ '5.6', '7.4', '8.3' ] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note: PHP 5.6 is still marked as supported on the wordpress.org plugin page so I think it makes sense to test it. Included 7.4 as well so we can confirm it works on the latest minor version of PHP 7. Arguably this one could be skipped? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding 8.3 is great, let us keep the other versions for now. We might reduce them at some point. |
||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: ${{ matrix.php-version }} | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '16' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note: Using Node 16 as this is the version specific in the .nvmrc file. We might want to consider upgrading it as it's quite an old version, but that's probably out of the scope for this task. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, we have a separate task to upgrade that. |
||
| cache: 'npm' | ||
|
|
||
| - name: Cache Composer | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.composer/cache | ||
| key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-composer-${{ matrix.php }}- | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Run linting | ||
| run: npm run lint | ||
|
|
||
| - name: Run build | ||
| run: npm run build | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -157,7 +157,6 @@ public function register_assets() { | |
| * Enqueue Assets. | ||
| */ | ||
| public function enqueue_assets() { | ||
|
|
||
| } | ||
|
|
||
| /** | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1305,7 +1305,7 @@ public function apply_default_transformations( array $transformations, $attachme | |
| * | ||
| * @return array | ||
| */ | ||
| public function default_image_transformations( $default ) { | ||
| public function default_image_transformations( $default ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.defaultFound | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note: We could consider renaming all the variables using a reserved keyword... But I'm always a bit wary to do these type of refactor without properly testing (things could easily go wrong if the IDE misses something like a string interpolation, or dynamic calling the variable perhaps). And testing all of these could take a significant amount of time. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree, let us keep the previous names |
||
|
|
||
| $config = $this->settings->get_value( 'image_settings' ); | ||
|
|
||
|
|
@@ -1330,7 +1330,7 @@ public function default_image_transformations( $default ) { | |
| * | ||
| * @return array | ||
| */ | ||
| public function default_image_freeform_transformations( $default ) { | ||
| public function default_image_freeform_transformations( $default ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.defaultFound | ||
| $config = $this->settings->get_value( 'image_settings' ); | ||
| if ( ! empty( $config['image_freeform'] ) ) { | ||
| $default[] = trim( $config['image_freeform'] ); | ||
|
|
@@ -2559,7 +2559,7 @@ public function get_transformation_from_meta( $post_id ) { | |
| * | ||
| * @return mixed | ||
| */ | ||
| public function get_post_meta( $post_id, $key = '', $single = false, $default = null ) { | ||
| public function get_post_meta( $post_id, $key = '', $single = false, $default = null ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.defaultFound | ||
|
|
||
| $meta = get_post_meta( $post_id, Sync::META_KEYS['cloudinary'], true ); | ||
| if ( empty( $meta ) ) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -78,7 +78,6 @@ public function init_settings() { | |
| * Set up the object. | ||
| */ | ||
| public function setup() { | ||
|
|
||
| } | ||
|
|
||
| /** | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,5 +16,4 @@ interface Config { | |
| * Retrive config from class. | ||
| */ | ||
| public function get_config(); | ||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,5 +18,4 @@ interface Notice { | |
| * @return array | ||
| */ | ||
| public function get_notices(); | ||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,5 +16,4 @@ interface Setup { | |
| * Setup the object. | ||
| */ | ||
| public function setup(); // phpcs:ignore | ||
|
|
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: This rule was showing several warnings in our JS. However it is really only needed in the context of a React application (see here) so I believe it can be disabled