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