Merge pull request #12247 from aembler/release/9.3.5 #40
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: Install | |
on: | |
pull_request: | |
push: | |
jobs: | |
install: | |
name: Install ${{ matrix.starting-point }} with PHP ${{ matrix.php-version }} | |
runs-on: ubuntu-latest | |
container: ghcr.io/concrete5-community/docker5:base | |
strategy: | |
matrix: | |
php-version: | |
- "7.4" | |
- "8.2" | |
starting-point: | |
- atomik_full | |
steps: | |
- | |
name: Configure environment | |
run: | | |
switch-composer 2 | |
switch-php ${{ matrix.php-version }} | |
ccm-service start db | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
- | |
name: Set owner | |
run: chown -R www-data:www-data "$GITHUB_WORKSPACE" | |
- | |
name: Install Composer dependencies | |
run: sudo -Hu www-data composer install --optimize-autoloader --no-cache --ansi --no-interaction | |
- | |
name: Configure Concrete | |
run: | | |
sudo -Hu www-data ./concrete/bin/concrete5 c5:config -g -- set concrete.debug.display_errors true | |
sudo -Hu www-data ./concrete/bin/concrete5 c5:config -g -- set concrete.debug.detail debug | |
sudo -Hu www-data ./concrete/bin/concrete5 c5:config -g -- set concrete.debug.error_reporting -1 | |
- | |
name: Install | |
run: | | |
sudo -Hu www-data \ | |
./concrete/bin/concrete5 c5:install \ | |
--ansi --no-interaction \ | |
--db-server=localhost \ | |
--db-username=c5 \ | |
--db-password=12345 \ | |
--db-database=c5 \ | |
--timezone=UTC \ | |
--site='ConcreteCMS website' \ | |
--starting-point=${{ matrix.starting-point }} \ | |
[email protected] \ | |
--admin-password=12345 \ | |
-vvv | |
- | |
name: Test that the website actually works | |
run: | | |
rm -rf /app | |
ln -s "$GITHUB_WORKSPACE" /app | |
ccm-service start web | |
SITE_NAME="$(sudo -u www-data ./concrete/bin/concrete5 c5:config get site.sites.default.name)" | |
curl -sSi -o /tmp/index.html http://localhost/ | |
if ! head -n1 /tmp/index.html | grep -Eq '^HTTP[^\s]* 200 ' || ! grep -Eq "<title>.*$SITE_NAME.*</title>" /tmp/index.html; then | |
echo 'Wrong response from the website' >&1 | |
cat /tmp/index.html >&2 | |
exit 1 | |
fi |