forked from coollabsio/coolify
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
676f616
commit 7ac2068
Showing
1 changed file
with
44 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: PHP Build and Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Step 1: Checkout the repository | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
# Step 2: Set up PHP environment | ||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.0' # Specify your PHP version here | ||
extensions: mbstring, intl, curl, xml # Optional PHP extensions you may need | ||
coverage: xdebug | ||
|
||
# Step 3: Install Composer (if not already installed by setup-php) | ||
- name: Install Composer | ||
run: | | ||
curl -sS https://getcomposer.org/installer | php | ||
mv composer.phar /usr/local/bin/composer | ||
# Step 4: Install dependencies | ||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-interaction | ||
|
||
# Step 5: Show list of installed dependencies | ||
- name: List installed dependencies | ||
run: composer show | ||
|
||
# Step 6: Run tests (e.g., PHPUnit, or any other test framework) | ||
- name: Run PHPUnit tests | ||
run: vendor/bin/phpunit --configuration phpunit.xml # Adjust this based on your testing setup |