Skip to content

Commit

Permalink
Update GitHub workflow settings and minor tweaks
Browse files Browse the repository at this point in the history
This commit includes several changes related to the GitHub workflows. These include updating OS dependency to 'ubuntu-latest', PHP version to 8.2 and 8.3, adding MySQL service, DB environment variables, as well as adding the steps to create MySQL databases in the workflows. Additionally, '.phpunit.cache' has been added to .gitignore files, and dependabot settings have been updated as well.

Signed-off-by: Sam Poyigi <[email protected]>
  • Loading branch information
sampoyigi committed Feb 29, 2024
1 parent 94f2bc5 commit 48b55db
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,24 @@ jobs:
matrix:
os: [ ubuntu-latest ]
php: [ 8.2, 8.3 ]
env:
DB_DATABASE: testbench
DB_USERNAME: root
DB_PASSWORD: root

name: PHP ${{ matrix.php }} - ${{ matrix.os }}

services:
mysql:
image: 'mysql:8.0'
env:
MYSQL_ALLOW_EMPTY_PASSWORD: false
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: testbench
ports:
- 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -23,10 +38,16 @@ jobs:
extensions: dom, curl, xml, mbstring, zip, pdo, sqlite, bcmath, soap, intl, gd
coverage: none

- name: Create MySQL Database
run: |
sudo systemctl start mysql
mysql -u${{ env.DB_USERNAME }} -p${{ env.DB_PASSWORD }} -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' --port ${{ job.services.mysql.ports['3306'] }}
- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install dependencies
run: composer update --prefer-stable --prefer-dist --no-interaction

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ jobs:
types:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [ 8.2, 8.3 ]
name: PHP ${{ matrix.php }} - Static Analysis
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.php_cs
.php_cs.cache
.phpunit.result.cache
.phpunit.cache
/build
composer.lock
coverage
Expand Down

0 comments on commit 48b55db

Please sign in to comment.