Feature/update php version 7.2.5 #48
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: pull_request | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP 7.4 | |
| run: | | |
| sudo add-apt-repository ppa:ondrej/php -y | |
| sudo apt-get update -q | |
| sudo apt-get install -y php7.4 php7.4-cli php7.4-mbstring php7.4-xml php7.4-curl | |
| sudo update-alternatives --set php /usr/bin/php7.4 | |
| php -v | |
| - name: Install dependencies | |
| run: composer install | |
| - name: Run linter | |
| run: ./vendor/bin/phplint | |
| unit-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| php-version: ['7.2', '8.0', '8.4'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP ${{ matrix.php-version }} | |
| run: | | |
| sudo add-apt-repository ppa:ondrej/php -y | |
| sudo apt-get update -q | |
| sudo apt-get install -y php${{ matrix.php-version }} php${{ matrix.php-version }}-cli php${{ matrix.php-version }}-mbstring php${{ matrix.php-version }}-xml php${{ matrix.php-version }}-curl | |
| sudo update-alternatives --set php /usr/bin/php${{ matrix.php-version }} | |
| php -v | |
| - name: Bootstrap tests | |
| run: cp tests/bootstrap.php.dist tests/bootstrap.php | |
| - name: Install dependencies | |
| run: composer install --ignore-platform-req=php+ | |
| - name: Run unit tests | |
| run: ./vendor/phpunit/phpunit/phpunit tests/ |