build #1722
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: | |
paths-ignore: | |
- 'docs/**' | |
- 'README.md' | |
- 'CHANGELOG.md' | |
- '.gitignore' | |
- '.env.example' | |
- '.gitattributes' | |
- 'infection.json.dist' | |
- 'psalm.xml' | |
push: | |
paths-ignore: | |
- 'docs/**' | |
- 'README.md' | |
- 'CHANGELOG.md' | |
- '.gitignore' | |
- '.gitattributes' | |
- 'infection.json.dist' | |
- 'psalm.xml' | |
schedule: | |
- cron: '0 0 * * *' | |
name: build | |
jobs: | |
codeception-tests: | |
name: Codeception Tests | |
env: | |
extensions: fileinfo, ldap, intl, pdo_sqlite | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install PHP with extensions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
extensions: ${{ env.extensions }} | |
ini-values: date.timezone='UTC' | |
tools: composer:v2 | |
- name: Start LDAP Server | |
run: | | |
docker run --detach --rm --name openldap \ | |
--net=host \ | |
--env BITNAMI_DEBUG=true \ | |
--env LDAP_CONFIG_ADMIN_ENABLED=yes \ | |
--env LDAP_ADMIN_USERNAME=admin \ | |
--env LDAP_ADMIN_PASSWORD=secret \ | |
--env LDAP_EXTRA_SCHEMAS=cosine,inetorgperson,nis,bitnami-openldap-memberof \ | |
-v ${GITHUB_WORKSPACE}/resources/ldap/example.ldif:/ldifs/example-quickstart.ldif \ | |
-v ${GITHUB_WORKSPACE}/resources/ldap/bitnami-openldap-memberof.ldif:/opt/bitnami/openldap/etc/schema/bitnami-openldap-memberof.ldif \ | |
-p 1389:1389 \ | |
bitnami/openldap:latest | |
- name: Start Selenium | |
run: | | |
docker run --detach --net=host --shm-size="2g" selenium/standalone-chrome:4.8.0-20230131 | |
- name: Update composer | |
run: composer self-update | |
- name: Install dependencies with composer | |
run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi | |
- name: Run tests with codeception | |
run: | | |
cp ${GITHUB_WORKSPACE}/config/ldap.tests.php ${GITHUB_WORKSPACE}/config/ldap.php | |
php -S 127.0.0.1:8080 -t public > ./runtime/yii.log 2>&1 & | |
vendor/bin/codecept run | |
- name: Upload Codeception Output | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: codeception-output | |
path: runtime/tests/_output/* |