208 lines
6.3 KiB
YAML
208 lines
6.3 KiB
YAML
name: Test extensions
|
|
|
|
on:
|
|
- pull_request
|
|
|
|
jobs:
|
|
check_syntax_data:
|
|
name: Check data syntax
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Check order supported extensions list
|
|
run: |
|
|
sort -o data/supported-extensions.sorted data/supported-extensions
|
|
if ! DIFF="$(diff -u data/supported-extensions data/supported-extensions.sorted)"; then
|
|
printf 'The order of extensions in data/supported-extensions is wrong.\nThe list of required changes is:\n\n%s\n' "$DIFF" >&2
|
|
exit 1
|
|
fi
|
|
rm data/supported-extensions.sorted
|
|
sort -o data/special-requirements.sorted data/special-requirements
|
|
if ! DIFF="$(diff -u data/special-requirements data/special-requirements.sorted)"; then
|
|
printf 'The order of extensions in data/special-requirements is wrong.\nThe list of required changes is:\n\n%s\n' "$DIFF" >&2
|
|
exit 1
|
|
fi
|
|
rm data/special-requirements.sorted
|
|
check_syntax_shell:
|
|
name: Check shell coding style
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: "1.21.0"
|
|
- name: Install shfmt
|
|
run: GO111MODULE=on go install mvdan.cc/sh/v3/cmd/shfmt@v3.7.0
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Check coding style
|
|
run: ./scripts/invoke-shfmt check
|
|
check_syntax_php:
|
|
name: Check PHP coding style
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: "7.4"
|
|
tools: composer
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Install Composer dependencies
|
|
run: composer install --no-progress --classmap-authoritative
|
|
- name: Check coding style
|
|
run: composer run-script lint -- --dry-run --diff
|
|
test_extensions:
|
|
needs:
|
|
- check_syntax_data
|
|
- check_syntax_shell
|
|
- check_syntax_php
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
distro:
|
|
- alpine3.9
|
|
- alpine3.10
|
|
- alpine3.11
|
|
- alpine3.12
|
|
- alpine3.13
|
|
- alpine3.14
|
|
- alpine3.15
|
|
- alpine3.16
|
|
- alpine3.17
|
|
- alpine3.18
|
|
- alpine3.19
|
|
- jessie
|
|
- stretch
|
|
- buster
|
|
- bullseye
|
|
- bookworm
|
|
name: Check on ${{ matrix.distro }}
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
IPETEST_DOCKER_DISTRO: ${{ matrix.distro }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Test extensions
|
|
run: ./scripts/ci-test-extensions from-commits "${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}"
|
|
test_restoring_packages:
|
|
name: Test restoring packages
|
|
needs:
|
|
- check_syntax_data
|
|
- check_syntax_shell
|
|
- check_syntax_php
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- run: docker run --rm --volume "$(pwd):/app" --workdir /app php:8.2-bullseye ./scripts/test-restore-apt
|
|
test_custom_version:
|
|
name: Test installing specific versions
|
|
needs:
|
|
- check_syntax_data
|
|
- check_syntax_shell
|
|
- check_syntax_php
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
xdebug_version:
|
|
- ''
|
|
- 2.9.8
|
|
- 3.0.0
|
|
- ^2
|
|
- ^2.8
|
|
- ^2.8@stable
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- run: docker run --rm --volume "$(pwd):/app" --workdir /app php:7.4-alpine ./scripts/test-installversion "${{ matrix.xdebug_version }}"
|
|
test_composer:
|
|
name: Test installing composer
|
|
needs:
|
|
- check_syntax_data
|
|
- check_syntax_shell
|
|
- check_syntax_php
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
composer_version:
|
|
- ''
|
|
- '1'
|
|
- '2.0.1'
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- run: |
|
|
docker run --rm --volume "$(pwd):/app" --workdir /app php:7.4-alpine ./scripts/test-installcomposer "${{ matrix.composer_version }}"
|
|
test_marking_packages:
|
|
name: Test marking pre-installed packages
|
|
needs:
|
|
- check_syntax_data
|
|
- check_syntax_shell
|
|
- check_syntax_php
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
distro:
|
|
- alpine
|
|
- buster
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- run: docker run --rm --volume "$(pwd):/app" --workdir /app "php:7.4-${{ matrix.distro }}" "./scripts/ci-markused-${{ matrix.distro }}"
|
|
test_instantclient_basic:
|
|
name: Test using Oracle Instant Client Basic
|
|
needs:
|
|
- check_syntax_data
|
|
- check_syntax_shell
|
|
- check_syntax_php
|
|
runs-on: ubuntu-latest
|
|
container: php:8.1-cli-alpine
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- run: IPE_INSTANTCLIENT_BASIC=1 ./install-php-extensions oci8 pdo_oci
|
|
test_install_fromsource:
|
|
name: Test installing from source
|
|
needs:
|
|
- check_syntax_data
|
|
- check_syntax_shell
|
|
- check_syntax_php
|
|
runs-on: ubuntu-latest
|
|
container: ${{ matrix.container }}
|
|
strategy:
|
|
matrix:
|
|
container:
|
|
- php:8.1-cli-alpine
|
|
source:
|
|
- php-memcached-dev/php-memcached@8f106564e6bb005ca6100b12ccc89000daafa9d8
|
|
- php-memcached-dev/php-memcached@8f106564e6bb
|
|
- php-memcached-dev/php-memcached@v3.2.0RC2
|
|
- php-memcached-dev/php-memcached@refs/tags/v3.2.0RC2
|
|
include:
|
|
-
|
|
container: php:8.1-cli-bullseye
|
|
source: php-memcached-dev/php-memcached@v3.2.0RC2
|
|
-
|
|
container: php:7.4-cli-alpine
|
|
source: php-memcached-dev/php-memcached@v3.2.0RC2
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- run: ./install-php-extensions ${{ matrix.source }}
|
|
test_upgrading_icu_data_en:
|
|
name: Test that icu-data-en can be upgraded
|
|
needs:
|
|
- check_syntax_data
|
|
- check_syntax_shell
|
|
- check_syntax_php
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- run: docker run --rm --volume "$(pwd):/app" --workdir /app php:8.2-cli-alpine ./scripts/test-icu-data-en-upgradable
|