continuous_integration #309
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: continuous_integration | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 4 1 * *" | |
push: | |
branches: | |
- master | |
- develop | |
pull_request: | |
branches: | |
- master | |
- develop | |
jobs: | |
continuous_integration: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: ["8.1", "8.2", "8.3"] | |
fail-fast: false | |
name: Make sure that the WPGraphQLTestCase works!!! | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: json, mbstring | |
- name: Install WP PHPUnit Dependencies | |
run: | | |
composer install | |
composer require wp-phpunit/wp-phpunit \ | |
yoast/phpunit-polyfills \ | |
phpunit/phpunit:^9.6 \ | |
wp-phpunit/wp-phpunit \ | |
- name: Run PHPUnit Tests w/ Docker. | |
env: | |
PHP_VERSION: ${{ matrix.php }} | |
run: composer run-phpunit -- -- --coverage-text | |
- name: Install WPBrowser Dependencies | |
run: | | |
composer install | |
composer require codeception/module-asserts:* \ | |
codeception/util-universalframework:* \ | |
codeception/module-cli:* \ | |
codeception/module-db:* \ | |
codeception/module-filesystem:* \ | |
codeception/module-phpbrowser:* \ | |
codeception/module-webdriver:* \ | |
wp-cli/wp-cli-bundle \ | |
"lucatume/wp-browser:>3.1 <3.5" \ | |
- name: Run Codeception Tests w/ Docker. | |
env: | |
PHP_VERSION: ${{ matrix.php }} | |
run: | | |
composer run-codeception -- -- functional | |
composer run-codeception -- -- wpunit --coverage --coverage-xml | |
- name: Push Codecoverage to Coveralls.io | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
docker compose run --rm \ | |
--user $(id -u) \ | |
-e COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN \ | |
codeception_testing \ | |
vendor/bin/php-coveralls -v |