Bump version #148
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: Behat Tests | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
PORT_LDAP: 3389 | |
PORT_LDAPS: 6363 | |
LDAP_ADMIN_PASSWORD: ${{ secrets.LDAP_ADMIN_PASSWORD }} | |
LDAP_LOG_LEVEL: 0 | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: ['8.0', '8.1', '8.2', '8.3', '8.4-rc'] | |
wordpress-version: ['6.2', '6.3', '6.4', '6.5', '6.6'] | |
name: Test on PHP ${{ matrix.php-version }}/WordPress ${{ matrix.wordpress-version }} | |
steps: | |
- uses: actions/checkout@v1 | |
# - name: Docker Compose Pull | |
# run: docker compose pull | |
- name: Cache Docker images | |
id: docker-cache | |
uses: ScribeMD/[email protected] | |
with: | |
key: | |
docker-${{ runner.os }}-${{ matrix.php-version }}-${{ matrix.wordpress-version }}-${{ hashFiles('docker-compose.yml') }} | |
- name: Build the docker-compose stack | |
if: steps.docker-cache.outputs.cache-hit != 'true' | |
run: docker compose build --build-arg PHP_VERSION=${{ matrix.php-version }} --build-arg WORDPRESS_VERSION=${{ matrix.wordpress-version }} wp | |
- name: run the stack | |
run: docker compose -f docker-compose.yml up -d | |
- name: Check running containers | |
run: docker ps -a | |
- name: Check logs | |
run: docker compose logs openldap | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
tools: phive | |
- name: install dependencies | |
run: composer install | |
- name: install behat | |
run: | | |
composer require --dev behat/behat | |
- name: run behat | |
run: docker compose exec wp bash -c "cd wp-content/plugins/authldap && ./vendor/bin/behat" | |
- name: Check logs | |
if: ${{ failure() }} | |
run: docker compose logs |