Add platform detection to get-binaries.sh #84
Workflow file for this run
This file contains 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
on: | |
pull_request: null | |
name: phpunit | |
jobs: | |
phpunit: | |
name: "[Postgres:${{ matrix.pgsql-version }}] PHP 8.3-${{ matrix.os }}, ${{ matrix.stability }}" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [ '8.3' ] | |
os: [ 'ubuntu-latest' ] | |
stability: [ 'prefer-stable' ] | |
pgsql-version: [ '14','15','16' ] | |
services: | |
postgres: | |
image: postgres:${{ matrix.pgsql-version }} | |
env: | |
POSTGRES_PASSWORD: secret | |
POSTGRES_DB: buggregator | |
ports: | |
- 15432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
# General Steps | |
- name: Set Git To Use LF | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Configure environment | |
run: | | |
export COMPOSER_ROOT_VERSION=$(/usr/bin/jq --null-input --raw-output 'first(inputs["extra"]["branch-alias"])[]' composer.json) | |
echo COMPOSER_ROOT_VERSION=$COMPOSER_ROOT_VERSION >> $GITHUB_ENV | |
- name: Setup PHP ${{ matrix.php }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: sockets,mongodb,pgsql,pdo_pgsql,pdo_mysql | |
tools: pecl | |
- name: Validate Composer | |
run: composer validate | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Restore Composer Cache | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer | |
- name: Install Dependencies | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 5 | |
command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress | |
# Execution pgsql | |
- name: Execute Tests on Postgres | |
run: vendor/bin/phpunit | |
env: | |
PERSISTENCE_DRIVER: db | |
DB_DRIVER: pgsql | |
DB_HOST: 127.0.0.1 | |
DB_PORT: 15432 | |
DB_DATABASE: buggregator | |
DB_USERNAME: postgres | |
DB_PASSWORD: secret |