WordPress.org

Make WordPress Core

Changeset 49786


Ignore:
Timestamp:
12/10/2020 07:17:28 PM (10 months ago)
Author:
desrosj
Message:

Build/Test Tools: Reestablish the codebase as a Git repo before reporting test results.

The test reporter uses the hidden .svn or .git directories to determine which changeset to send to WordPress.org along with the test report.

Because the GitHub Action workflow builds and prepares WordPress in a preceding job to share with each test job, the .git directory is missing (it is purposefully not included to limit artifact size).

This re-establishes the directory as a checkout of the wordpress-develop repository so that test results can be reported correctly.

See #50401.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/phpunit-tests.yml

    r49784 r49786  
    121121  # - Run the PHPUnit tests.
    122122  # - Checks out the WordPress Test reporter repository.
     123  # - Reconnect the directory to the Git repository.
    123124  # - Submit the test results to the WordPress.org host test results.
    124125  # - todo: Configure Slack notifications for failing tests.
     
    280281          path: 'test-runner'
    281282
     283      - name: Set up the Git repository
     284        if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/master' && matrix.report }}
     285        run: |
     286          git init
     287          git remote add origin https://github.com/WordPress/wordpress-develop.git
     288          git fetch
     289          git reset origin/master
     290
    282291      - name: Submit test results to the WordPress.org host test results
    283292        if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/master' && matrix.report }}
    284293        env:
    285294          WPT_REPORT_API_KEY: "${{ secrets.WPT_REPORT_API_KEY }}"
    286         run: docker-compose run --rm -e "$WPT_REPORT_API_KEY" -e WPT_PREPARE_DIR=/var/www -e WPT_TEST_DIR=/var/www php php test-runner/report.php
     295        run: docker-compose run --rm -e WPT_REPORT_API_KEY -e WPT_PREPARE_DIR=/var/www -e WPT_TEST_DIR=/var/www php php test-runner/report.php
Note: See TracChangeset for help on using the changeset viewer.