Merge branch 'master' into dependabot/github_actions/actions/upload-a… #1348
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| test: | |
| name: PHP ${{ matrix.php }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ['8.1', '8.2', '8.3', '8.4'] | |
| include: | |
| - php: '8.1' | |
| coverage: xdebug | |
| flags: '--coverage-clover clover.xml' | |
| services: | |
| mysql: | |
| image: mariadb | |
| ports: | |
| - 3306/tcp | |
| env: | |
| MYSQL_ALLOW_EMPTY_PASSWORD: false | |
| MYSQL_ROOT_PASSWORD: secret | |
| MYSQL_DATABASE: yourls_tests | |
| MARIADB_MYSQL_LOCALHOST_USER: 1 | |
| MARIADB_MYSQL_LOCALHOST_GRANTS: USAGE | |
| options: --health-cmd="healthcheck.sh --su-mysql --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Use PHP ${{ matrix.php }} | |
| uses: shivammathur/setup-php@2.36.0 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: mbstring, curl, zip, dom, simplexml, intl, pdo_mysql | |
| tools: phpunit | |
| coverage: ${{ matrix.coverage }} | |
| # - name: Validate composer.json and composer.lock | |
| # run: composer validate | |
| # - name: Cache Composer packages | |
| # id: composer-cache | |
| # uses: actions/cache@v2 | |
| # with: | |
| # path: vendor | |
| # key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
| # restore-keys: | | |
| # ${{ runner.os }}-php- | |
| # - name: Install dependencies | |
| # if: steps.composer-cache.outputs.cache-hit != 'true' | |
| # run: composer install --prefer-dist --no-progress --no-suggest | |
| # env: | |
| # APP_ENV: testing | |
| # - name: Lint | |
| # run: composer run-script lint | |
| - name: Prepare the application | |
| run: | | |
| git clone https://github.com/ozh/YOURLS-fr_FR.git user/languages/fr | |
| cp user/languages/fr/fr_FR.* user/languages | |
| cp tests/data/config/yourls-tests-config-ci.php user/config.php | |
| - name: Test | |
| run: phpunit --configuration phpunit.xml.dist --testdox --display-deprecations --display-notices --display-warnings --display-errors ${{ matrix.flags }} | |
| env: | |
| DB_PORT: ${{ job.services.mysql.ports['3306'] }} |