upstream #39
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: upstream | |
| on: | |
| schedule: | |
| - cron: '0 3 * * *' | |
| push: | |
| branches: | |
| - develop | |
| paths: | |
| - tests/Upstream/** | |
| - .github/workflows/upstream.yml | |
| pull_request: | |
| branches: | |
| - develop | |
| paths: | |
| - tests/Upstream/** | |
| - .github/workflows/upstream.yml | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: upstream-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| baseline: | |
| name: Upstream Language Baseline [PHP ${{ matrix.php-version }}] | |
| runs-on: ubuntu-24.04 | |
| if: github.repository == 'codeigniter4/translations' | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| # Run only on the highest supported PHP version to reduce API load | |
| matrix: | |
| php-version: ['8.5'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| extensions: intl, mbstring | |
| coverage: none | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache composer dependencies | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.COMPOSER_CACHE_FILES_DIR }} | |
| key: composer-PHP_${{ matrix.php-version }}-${{ hashFiles('**/composer.json') }} | |
| restore-keys: composer-PHP_${{ matrix.php-version }}- | |
| - name: Install dependencies | |
| run: composer update --ansi | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run Upstream Test Suite | |
| run: vendor/bin/phpunit --color=always --group=upstream |