Fixes the docker demo #46
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: [pull_request] | |
jobs: | |
test: | |
name: Test Suite | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.1 | |
extensions: mbstring, intl, sqlite3, mysqli | |
- name: Test | |
run: | | |
cd app | |
composer validate | |
composer install --prefer-dist --no-interaction --no-progress | |
mkdir -p plugins/AuthenticationApi/config/keys/1 | |
openssl genrsa -out plugins/AuthenticationApi/config/keys/1/private.pem 2048 | |
openssl rsa -in plugins/AuthenticationApi/config/keys/1/private.pem -outform PEM -pubout -out plugins/AuthenticationApi/config/keys/1/public.pem | |
openssl rand -base64 24 > plugins/AuthenticationApi/config/keys/hmac_secret.txt | |
cp config/.env.example config/.env | |
cp config/app_local.example.php config/app_local.php | |
vendor/bin/phpunit | |
build: | |
name: Docker Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Env Files | |
run: | | |
cp .docker/php.env.development .docker/php.env | |
cp .docker/mysql.env.development .docker/mysql.env | |
- name: Pull images | |
run: docker-compose pull | |
- name: Build | |
run: docker-compose build --build-arg UID=$(id -u) --build-arg ENV=dev | |
- name: Start | |
run: docker-compose up -d | |
- name: Wait for services | |
run: sleep 5 | |
- name: HTTP Check | |
run: curl -v -o /dev/null http://localhost:8080 |