Merge pull request #9 from City-of-Helsinki/main #135
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: [push] | |
name: CI | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/city-of-helsinki/drupal-php-docker:8.2-alpine | |
services: | |
db: | |
image: mariadb | |
env: | |
MYSQL_USER: drupal | |
MYSQL_PASSWORD: drupal | |
MYSQL_DATABASE: drupal | |
MYSQL_ROOT_PASSWORD: drupal | |
ports: | |
- 3306:3306 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Build project | |
run: composer install --no-interaction | |
- name: Scan security updates | |
run: composer audit | |
- name: Install Drupal | |
run: | | |
php -d sendmail_path=$(which true); vendor/bin/drush --yes -v site-install --db-url="$SIMPLETEST_DB" | |
vendor/bin/drush en helfi_platform_config | |
- name: Make sure Drupal is installed properly | |
run: | | |
vendor/bin/drush runserver $SIMPLETEST_BASE_URL & | |
sleep 5 | |
# Make sure Drupal is installed | |
curl -s -o /dev/null -I -w "%{http_code}" $SIMPLETEST_BASE_URL/user/login | grep -q 200 |