Bump actions/download-artifact from 5 to 8 in /.github/workflows #27
Workflow file for this run
This file contains hidden or 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
| name: Tests | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| run_full_tests: | |
| description: 'Run full tests?' | |
| required: false | |
| default: 'false' | |
| env: | |
| RUN_FULL_TESTS: ${{ github.event.inputs.run_full_tests || 'false' }} | |
| jobs: | |
| tests: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: | |
| # - "macos-latest" | |
| - "ubuntu-latest" | |
| php: | |
| # - "8.2" | |
| - "8.4" | |
| name: PHP ${{ matrix.php }} on ${{ matrix.os }} | |
| steps: | |
| - name: Install tools | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y sqlite3 libxml2-utils | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| - name: Check env | |
| run: | | |
| php -v | |
| sqlite3 -version | |
| xmllint --version | |
| wget --version | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Show help | |
| run: ./generate.sh -h | |
| - name: Test unsupported language | |
| run: | | |
| ! ./generate.sh unsupported-lang | |
| - name: Test default generation | |
| run: | | |
| rm -rf output | |
| ./generate.sh | |
| test -d output/PHP_en.docset | |
| - name: Test other language | |
| if: env.RUN_FULL_TESTS == 'true' | |
| run: | | |
| rm -rf output | |
| ./generate.sh zh | |
| test -d output/PHP_zh.docset | |
| - name: Test multiple languages | |
| if: env.RUN_FULL_TESTS == 'true' | |
| run: | | |
| rm -rf output | |
| ./generate.sh zh en | |
| test -d output/PHP_zh.docset | |
| test -d output/PHP_en.docset | |
| - name: Test --mirror option with default language | |
| run: | | |
| rm -rf output | |
| ./generate.sh --mirror | |
| test -d output/php.net | |
| test -d output/php.net/manual/en | |
| - name: Test --mirror option with multiple languages | |
| if: env.RUN_FULL_TESTS == 'true' | |
| run: | | |
| rm -rf output | |
| ./generate.sh --mirror en zh | |
| test -d output/php.net | |
| test -d output/php.net/manual/en | |
| test -d output/php.net/manual/zh | |
| - name: Test --no-usernotes option | |
| if: env.RUN_FULL_TESTS == 'true' | |
| run: | | |
| rm -rf output | |
| ./generate.sh --no-usernotes zh | |
| test -d output/PHP_zh.docset | |
| file="output/PHP_zh.docset/Contents/Resources/Documents/function.strlen.html" | |
| ! grep -q '<div id="usernotes">' "$file" || echo "❌ Found usernotes in $file" | |
| - name: Test --skip-update option | |
| if: env.RUN_FULL_TESTS == 'true' | |
| run: | | |
| rm -rf output phpdoc | |
| ! ./generate.sh --skip-update | |
| ./generate.sh zh && rm -rf output | |
| ./generate.sh zh --skip-update | |
| test -d output/PHP_zh.docset | |
| - name: Test --output option | |
| if: env.RUN_FULL_TESTS == 'true' | |
| run: | | |
| rm -rf output foo/bar | |
| ! ./generate.sh --output | |
| ./generate.sh --output foo/bar en zh | |
| test -d foo/bar/PHP_en.docset | |
| test -d foo/bar/PHP_zh.docset | |
| rm -rf foo/bar | |
| rm -rf ~/custom/output | |
| ./generate.sh --output ~/custom/output en zh --mirror | |
| test -d ~/custom/output/php.net | |
| test -d ~/custom/output/php.net/manual/en | |
| test -d ~/custom/output/php.net/manual/zh | |
| rm -rf ~/custom/output | |
| - name: Test all languages | |
| if: env.RUN_FULL_TESTS == 'true' | |
| run: | | |
| rm -rf output | |
| for lang in en de es fr it ja pt_BR ru tr uk zh; do | |
| ./generate.sh $lang --dev || echo "⚠️ Failed to generate Dash docset for the language: $lang" | |
| done |