From 7ac2068ad4b3af0935d324dc6ed9766c51d8b125 Mon Sep 17 00:00:00 2001 From: Pranesh-Shrestha Date: Thu, 9 Jan 2025 17:24:28 +0545 Subject: [PATCH] Create package list.yml --- .github/workflows/package list.yml | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/package list.yml diff --git a/.github/workflows/package list.yml b/.github/workflows/package list.yml new file mode 100644 index 0000000000..a9f87ea75e --- /dev/null +++ b/.github/workflows/package list.yml @@ -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