[1.0.0] Various server updates. #349
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
name: Build | |
on: [push, pull_request] | |
jobs: | |
run: | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: [ubuntu-latest, windows-latest] | |
php-versions: ['8.1', '8.2', '8.3'] | |
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
coverage: xdebug | |
tools: composer:v2.5 | |
- name: Install OpenLDAP | |
if: runner.os == 'Linux' | |
run: sudo ./tests/resources/openldap/setup.sh | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
shell: bash | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Install Composer dependencies | |
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Run Specs | |
run: composer run-script test-spec | |
# Not ideal, but we run as root here because the LDAP server needs access to certs / keys system directories. | |
# For tests this seems fine, but in a real scenario this would be bad... | |
- name: Run Integration Tests | |
if: runner.os == 'Linux' | |
env: | |
COMPOSER_ALLOW_SUPERUSER: 1 | |
run: sudo composer run-script test-integration |