Skip to content

Commit

Permalink
Update php.yml
Browse files Browse the repository at this point in the history
added db test
  • Loading branch information
sajed-zarrinpour authored Sep 6, 2024
1 parent 6b26fbc commit 32e71c7
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,25 @@ permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest

env:
DB_DATABASE: test_db
DB_USER: root
DB_PASSWORD: root

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Start MySQL
run: |
sudo /etc/init.d/mysql start
mysql -e "CREATE DATABASE IF NOT EXISTS $DB_DATABASE;" -u$DB_USER -p$DB_PASSWORD
# Add more steps for testing and other tasks
- name: Run Tests
run: composer run-script test
build:

runs-on: ubuntu-latest
Expand All @@ -35,5 +54,5 @@ jobs:
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

# - name: Run test suite
# run: composer run-script test
- name: Run test suite
run: composer run-script test

0 comments on commit 32e71c7

Please sign in to comment.