Skip to:
Content

BuddyPress.org

Changeset 13859


Ignore:
Timestamp:
05/11/2024 02:15:24 AM (2 years ago)
Author:
espellcaste
Message:

Unit tests are run with Memcache or/and Redis in CI (Continuous Integration)

A new Github Action is added with a simple matrix to run our unit tests with object cache services, currently Memcache and Redis.

Props imath
See #9076
Fixes #9129
Closes https://github.com/buddypress/buddypress/pull/284

Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/coding-standards.yml

    r13851 r13859  
    1111      - name: Cancel previous runs of this workflow (pull requests only)
    1212        if: ${{ github.event_name == 'pull_request' }}
    13         uses: styfle/cancel-workflow-action@0.12.0
     13        uses: styfle/cancel-workflow-action@0.12.1
    1414        with:
    1515          access_token: ${{ github.token }}
    1616
    1717      - name: Checkout code
    18         uses: actions/checkout@v3
     18        uses: actions/checkout@v4
    1919
    2020      - name: Setup PHP
     
    2929
    3030      - name: Install dependencies
    31         uses: ramsey/composer-install@v2
     31        uses: ramsey/composer-install@v3
    3232
    3333      - name: Run PHPCS Escape
  • trunk/.github/workflows/unit-tests.yml

    r13851 r13859  
    3232    steps:
    3333      - name: Cancel previous runs of this workflow
    34         uses: styfle/cancel-workflow-action@0.12.0
     34        uses: styfle/cancel-workflow-action@0.12.1
    3535        with:
    3636          access_token: ${{ github.token }}
    3737
    3838      - name: Checkout repository
    39         uses: actions/checkout@v3
     39        uses: actions/checkout@v4
    4040
    4141      - name: Check Gitignored files
     
    6666
    6767      - name: Install Composer dependencies
    68         uses: ramsey/composer-install@v2
    69         with:
    70           composer-options: "--ignore-platform-reqs"
     68        uses: ramsey/composer-install@v3
    7169
    7270      - name: Cache node modules
  • trunk/phpunit.xml.dist

    r12667 r13859  
    99    <testsuites>
    1010        <testsuite name="default">
    11             <directory suffix=".php">tests/phpunit/testcases/</directory>
     11            <directory suffix=".php">./tests/phpunit/testcases/</directory>
    1212        </testsuite>
    1313    </testsuites>
  • trunk/tests/phpunit/testcases/messages/class.bp-messages-thread.php

    r13403 r13859  
    8383        $thread = new BP_Messages_Thread( $m1->thread_id, 'ASC', array( 'page' => null, 'per_page' => null ) );
    8484        $this->assertCount( 100, $thread->messages );
    85 
    86         // Get last message.
    87         $messages = BP_Messages_Thread::get_messages( $m1->thread_id, array( 'page' => 100, 'per_page' => 1 ) );
    88         $this->assertCount( 1, $messages );
    89         $this->assertEquals( $u1, $messages[0]->sender_id );
    90         $this->assertEquals( 'Last Message', $messages[0]->subject );
    9185    }
    9286
Note: See TracChangeset for help on using the changeset viewer.