mirror of
https://github.com/smarty-php/smarty.git
synced 2026-01-29 17:52:25 +01:00
70 lines
1.5 KiB
YAML
70 lines
1.5 KiB
YAML
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
|
|
name: CI
|
|
|
|
jobs:
|
|
tests:
|
|
name: Tests
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
env:
|
|
PHP_EXTENSIONS: dom, json, libxml, mbstring, pdo_sqlite, soap, xml, xmlwriter
|
|
PHP_INI_VALUES: assert.exception=1, zend.assertions=1
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
- windows-latest
|
|
|
|
php-version:
|
|
- "7.2"
|
|
- "7.3"
|
|
- "7.4"
|
|
- "8.0"
|
|
- "8.1"
|
|
- "8.2"
|
|
- "8.3"
|
|
- "8.4"
|
|
|
|
compiler:
|
|
- default
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install PHP with extensions
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php-version }}
|
|
coverage: pcov
|
|
extensions: ${{ env.PHP_EXTENSIONS }}
|
|
ini-values: ${{ env.PHP_INI_VALUES }}
|
|
|
|
- name: Cache Composer packages
|
|
id: composer-cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: vendor
|
|
key: v5r2-${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
|
|
restore-keys: |
|
|
v5r1-${{ runner.os }}-php-${{ matrix.php-version }}-
|
|
|
|
- name: Install dependencies
|
|
run: composer install
|
|
|
|
- name: Run make
|
|
run: make -B
|
|
|
|
- name: Run tests with phpunit
|
|
run: php ./vendor/phpunit/phpunit/phpunit
|