mirror of
https://github.com/chinayin/ip2region-sdk-php.git
synced 2025-06-22 03:25:07 +08:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
name: PHP Composer
|
|
|
|
on: [ push, pull_request ]
|
|
|
|
jobs:
|
|
build:
|
|
name: build (PHP ${{ matrix.php-versions }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
php-versions: [ '7.2', '7.4', '8.0', '8.1' ]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup PHP, with composer and extensions
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php-versions }}
|
|
tools: pecl
|
|
extensions: mbstring, dom
|
|
|
|
- name: Get composer cache directory
|
|
id: composer-cache
|
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
|
|
- name: Cache composer dependencies
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ${{ steps.composer-cache.outputs.dir }}
|
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
restore-keys: ${{ runner.os }}-composer-
|
|
|
|
- name: Validate composer.json and composer.lock
|
|
run: composer validate
|
|
|
|
- name: Install Composer dependencies
|
|
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
|
|
|
|
- name: Run test suite
|
|
run: composer travis
|