Skip to content

Commit

Permalink
Create package list.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Pranesh-Shrestha authored Jan 9, 2025
1 parent 676f616 commit 7ac2068
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/package list.yml
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

0 comments on commit 7ac2068

Please sign in to comment.