Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer install successfull, but Failed opening required 'vendor/autoload.php' on GitHub Action #25

Open
Bizarrus opened this issue Sep 10, 2024 · 0 comments

Comments

@Bizarrus
Copy link

Source: https://github.com/fruithost/Documentation/blob/main/.github/workflows/documentation.yml

name: Run Tests

on:
    push:

jobs:
    run-tests:
        runs-on: ubuntu-latest
        
        env: 
              CI_COMMIT_MESSAGE: Build Module-Packages
              CI_COMMIT_AUTHOR: fruithost | Modules Builder
              
        strategy:
            matrix:
                php: [8.1]

        name: PHP ${{ matrix.php }}

        steps:
            - name: Checkout repository
              uses: actions/checkout@v2
              
            - name: Setup PHP
              uses: shivammathur/setup-php@v2
              with:
                  php-version: ${{ matrix.php-version }}
                  coverage: ${{ matrix.coverage }}
                  tools: composer:v2
                  ini-values: date.timezone='UTC'
            
            - name: Get Sources
              run: |
                git clone https://github.com/fruithost/Panel.git ./src/
                git clone https://github.com/fruithost/Documentation.wiki.git ./wiki/
                git clone https://github.com/clean/phpdoc-md.git ./phpdoc/

            - name: Create temporary Config file
              run: |
                    touch ./config.php
                    echo "<?php" >> ./config.php
                    echo "return (object)[" >> ./config.php
                    echo "'rootNamespace' => 'Clean\PhpDocMd\Example'," >> ./config.php
                    echo "'destDirectory' => 'docs'," >> ./config.php
                    echo "'format' => 'github'," >> ./config.php
                    echo "'destDirectory' => 'docs'," >> ./config.php
                    echo "'classes' => [" >> ./config.php
                    echo "'src\**'" >> ./config.php
                    echo "]];" >> ./config.php
                                 
            - name: Install dependencies
              run: |
                  composer install --working-dir=./phpdoc/ --prefer-dist --no-interaction --no-progress
                  
            - name: Generating documentation...
              run: |
                  ./phpdoc/bin/phpdoc-md -h
                  ./phpdoc/bin/phpdoc-md ./config.php
             
            - name: Commit changes
              if: github.event_name == 'push'
              run: |
                set -e
                cp ./build/ ./wiki/
                git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
                git config --global user.email "[email protected]"
                git add .
                git diff-index --quiet HEAD || git commit -m "${{ env.CI_COMMIT_MESSAGE }}" && git push
PHP Warning:  require(vendor/autoload.php): Failed to open stream: No such file or directory in /home/runner/work/Documentation/Documentation/phpdoc/bin/phpdoc-md on line 7
PHP Fatal error:  Uncaught Error: Failed opening required 'vendor/autoload.php' (include_path='.:/usr/share/php') in /home/runner/work/Documentation/Documentation/phpdoc/bin/phpdoc-md:7
Stack trace:
#0 {main}
  thrown in /home/runner/work/Documentation/Documentation/phpdoc/bin/phpdoc-md on line 7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant