-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GH actions in scaffold package test
- Loading branch information
1 parent
195ccb1
commit f73d47a
Showing
3 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Testing | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
behat: | ||
strategy: | ||
matrix: | ||
php-version: ['8.0', '7.4'] | ||
runs-on: ubuntu-latest | ||
services: | ||
mysql: | ||
image: mysql:8 | ||
env: | ||
MYSQL_ALLOW_EMPTY_PASSWORD: yes | ||
MYSQL_DATABASE: wp_cli_test | ||
MYSQL_USER: wp_cli_test | ||
MYSQL_PASSWORD: password1 | ||
MYSQL_HOST: 127.0.0.1 | ||
ports: | ||
- 3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 | ||
steps: | ||
- name: Check out source code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
tools: composer | ||
|
||
- name: Install composer packages | ||
run: composer install | ||
|
||
- name: Run Behat | ||
run: composer run behat | ||
env: | ||
WP_CLI_TEST_DBUSER: wp_cli_test | ||
WP_CLI_TEST_DBPASS: password1 | ||
WP_CLI_TEST_DBNAME: wp_cli_test | ||
WP_CLI_TEST_DBHOST: 127.0.0.1:${{ job.services.mysql.ports[3306] }} |
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