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

Migrate Travis to Workflow #4626

Open
wants to merge 28 commits into
base: release
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9046ae0
debug to check from where file loading in workflow
KartikSuthar Feb 19, 2025
1e15845
fix the workflow
KartikSuthar Feb 19, 2025
1299b8e
fix the workflow
KartikSuthar Feb 19, 2025
de36bc9
fix the workflow
KartikSuthar Feb 19, 2025
2ec67b2
phpunit workflow fix
KartikSuthar Feb 20, 2025
978fbaf
allowed dynamic property for the phpuntit fix
KartikSuthar Feb 24, 2025
d9399c3
allowed dynamic property for the phpuntit fix
KartikSuthar Feb 24, 2025
c8dca19
Implement grunt ci to replace Travis
KartikSuthar Feb 24, 2025
28712e6
implemented grunt check using github workflow
KartikSuthar Feb 24, 2025
5cbb0a3
workflow fix
KartikSuthar Feb 24, 2025
53ccd1d
rename the workflow file
KartikSuthar Feb 24, 2025
248762d
updated workflow file
KartikSuthar Feb 24, 2025
5591b7e
updated workflow
KartikSuthar Feb 24, 2025
3f60269
updated workflow
KartikSuthar Feb 24, 2025
b1b6d00
grunt install update
KartikSuthar Feb 24, 2025
f5324bf
workflow update
KartikSuthar Feb 24, 2025
313d374
workflow updated
KartikSuthar Feb 24, 2025
ff7e6fb
workflow updated
KartikSuthar Feb 24, 2025
da696c1
workflow update
KartikSuthar Feb 24, 2025
71625b6
workflow update
KartikSuthar Feb 24, 2025
ffca2c7
workflow update
KartikSuthar Feb 24, 2025
eec8179
workflow update
KartikSuthar Feb 25, 2025
51c1985
workflow update
KartikSuthar Feb 25, 2025
17cb229
workflow update
KartikSuthar Feb 25, 2025
d375431
workflow update
KartikSuthar Feb 25, 2025
bd22a1e
workflow update
KartikSuthar Feb 25, 2025
90b95e1
workflow update
KartikSuthar Feb 25, 2025
1974d1d
removed travis
KartikSuthar Feb 25, 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
89 changes: 89 additions & 0 deletions .github/workflows/npm-grunt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: NodeJS with Grunt

on:
push:
branches:
- "release"
- "master"
pull_request:
branches:
- "release"
- "master"
# Enable manual trigger
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x]
fail-fast: false

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Clean npm cache
run: npm cache clean --force

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential python3 gcc g++ make

- name: Setup Python 3
run: |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
python --version

- name: Update npm and node-gyp for Node 16
if: matrix.node-version == '16.x'
run: |
npm install -g [email protected]
npm install -g [email protected]
npm config set node_gyp $(npm prefix -g)/lib/node_modules/node-gyp/bin/node-gyp.js

- name: Install Grunt CLI
run: npm install -g grunt-cli

- name: Install node-sass for Node 14
if: matrix.node-version == '14.x'
run: |
npm config set sass-binary-site=https://github.com/sass/node-sass/releases/download
npm install [email protected] --save-dev --force
npm rebuild node-sass

- name: Install node-sass for Node 16
if: matrix.node-version == '16.x'
run: |
export SASS_BINARY_SITE=https://github.com/sass/node-sass/releases/download
npm install [email protected] --save-dev --force --unsafe-perm
npm rebuild node-sass --update-binary

- name: Install specific dependencies first
run: |
npm install [email protected] --save-dev --force
npm install [email protected] --save-dev --force
npm install [email protected] --save-dev --force
npm install [email protected] --save-dev --force
npm install [email protected] --save-dev --force

- name: Install remaining dependencies
run: npm install --legacy-peer-deps --no-audit --force

- name: Display versions
run: |
npm -v
node -v

- name: Run Grunt
run: grunt --verbose
153 changes: 0 additions & 153 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions src/bp-activity/classes/class-bp-activity-activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*
* @since BuddyPress 1.0.0
*/
#[\AllowDynamicProperties]
class BP_Activity_Activity {

/** Properties ************************************************************/
Expand Down
102 changes: 51 additions & 51 deletions src/bp-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,61 +454,61 @@ function bp_duplicate_notice() {
add_action( 'network_admin_notices', 'bp_duplicate_notice' );
}

/**
* Load the buddyboss translation file for current language.
*
* @since BuddyPress 1.0.2
* @since BuddyBoss 2.7.90 Moved function from bp-core-functions.php and made logic updates.
*
* @see load_textdomain() for a description of return values.
*
* @return bool True on success, false on failure.
*/
function bp_core_load_buddypress_textdomain() {
$domain = 'buddyboss';
if ( ! is_textdomain_loaded( $domain ) ) {

$mofile_custom = sprintf( '%s-%s.mo', $domain, get_locale() );
$plugin_dir_path = defined( 'BP_PLUGIN_DIR' ) ? BP_PLUGIN_DIR : plugin_dir_path( __FILE__ );
$plugin_dir = $plugin_dir_path;
if ( defined( 'BP_SOURCE_SUBDIRECTORY' ) && ! empty( constant( 'BP_SOURCE_SUBDIRECTORY' ) ) ) {
$plugin_dir = $plugin_dir . 'src';
}
if ( ! function_exists( 'bp_core_load_buddypress_textdomain' ) ) {
/**
* Load the buddyboss translation file for current language.
*
* @since BuddyPress 1.0.2
* @since BuddyBoss 2.7.90 Moved function from bp-core-functions.php and made logic updates.
*
* @return bool True on success, false on failure.
* @see load_textdomain() for a description of return values.
*/
function bp_core_load_buddypress_textdomain() {
$domain = 'buddyboss';
if ( ! is_textdomain_loaded( $domain ) ) {
$mofile_custom = sprintf( '%s-%s.mo', $domain, get_locale() );
$plugin_dir_path = defined( 'BP_PLUGIN_DIR' ) ? BP_PLUGIN_DIR : plugin_dir_path( __FILE__ );
$plugin_dir = $plugin_dir_path;
if ( defined( 'BP_SOURCE_SUBDIRECTORY' ) && ! empty( constant( 'BP_SOURCE_SUBDIRECTORY' ) ) ) {
$plugin_dir = $plugin_dir . 'src';
}

/**
* Filters the locations to load language files from.
*
* @since BuddyBoss 2.7.90
*
* @param array $value Array of directories to check for language files in.
*/
$locations = apply_filters(
'buddyboss_locale_locations',
array(
trailingslashit( WP_LANG_DIR . '/' . $domain ),
trailingslashit( WP_LANG_DIR ),
trailingslashit( WP_LANG_DIR . '/plugins' ),
trailingslashit( $plugin_dir . '/languages' ),
)
);

unload_textdomain( $domain );

// Try to load the translations from locations.
foreach ( $locations as $location ) {
if ( load_textdomain( $domain, $location . $mofile_custom ) ) {
return true;
/**
* Filters the locations to load language files from.
*
* @since BuddyBoss 2.7.90
*
* @param array $value Array of directories to check for language files in.
*/
$locations = apply_filters(
'buddyboss_locale_locations',
array(
trailingslashit( WP_LANG_DIR . '/' . $domain ),
trailingslashit( WP_LANG_DIR ),
trailingslashit( WP_LANG_DIR . '/plugins' ),
trailingslashit( $plugin_dir . '/languages' ),
)
);

unload_textdomain( $domain );

// Try to load the translations from locations.
foreach ( $locations as $location ) {
if ( load_textdomain( $domain, $location . $mofile_custom ) ) {
return true;
}
}
}

$plugin_folder = plugin_basename( $plugin_dir_path );
$buddyboss_lang_path = $plugin_folder . '/languages';
if ( defined( 'BP_SOURCE_SUBDIRECTORY' ) && ! empty( constant( 'BP_SOURCE_SUBDIRECTORY' ) ) ) {
$buddyboss_lang_path = $plugin_folder . '/src/languages';
$plugin_folder = plugin_basename( $plugin_dir_path );
$buddyboss_lang_path = $plugin_folder . '/languages';
if ( defined( 'BP_SOURCE_SUBDIRECTORY' ) && ! empty( constant( 'BP_SOURCE_SUBDIRECTORY' ) ) ) {
$buddyboss_lang_path = $plugin_folder . '/src/languages';
}

return load_plugin_textdomain( $domain, false, $buddyboss_lang_path );
}

return load_plugin_textdomain( $domain, false, $buddyboss_lang_path );
return false;
}

return false;
}
1 change: 1 addition & 0 deletions tests/phpunit/includes/factory.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
#[\AllowDynamicProperties]
class BP_UnitTest_Factory extends WP_UnitTest_Factory {
public $activity = null;

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/includes/loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ function _bp_mock_mailer( $class ) {
}
}
} );
}
}
Loading