Swagger UI Formatter tests #77
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: Swagger UI Formatter tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
code_style: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Swagger UI Formatter | |
uses: actions/checkout@v2 | |
- name: Checkout Drupal-Dev | |
uses: actions/checkout@v2 | |
with: | |
repository: Pronovix/docker-drupal-dev | |
path: ./drupal-dev | |
- name: Setup environment | |
run: | | |
mkdir build | |
sudo chown runneradmin build | |
ln -s drupal-dev/docker-compose.yml . | |
ln -s drupal-dev/Dockerfile . | |
printf "COMPOSE_PROJECT_NAME=swagger_ui_formatter\n" > .env | |
- name: Create Docker containers | |
env: | |
PHP_IMAGE: "wodby/drupal-php:8.1-dev" | |
run: | | |
docker-compose pull --quiet | |
docker-compose up -d --build | |
- name: Install dependencies | |
run: | | |
chmod a+rw . | |
docker-compose exec -T php composer install --no-interaction --no-suggest --no-progress -d .. | |
- name: Run code style check | |
run: CHECK_CS="true" ./.dev/.ci/check-cs.sh | |
test: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
php_image: ["wodby/drupal-php:8.1-dev"] | |
db_image: ["wodby/mariadb:10.5"] | |
# TODO Get version range from composer.json dynamically. | |
drupal_version: ["~9.4.0", "~9.5.0", "^10.0"] | |
lowest_highest: ["--prefer-lowest", ""] | |
steps: | |
- name: Checkout Swagger UI Formatter | |
uses: actions/checkout@v2 | |
- name: Checkout Drupal-Dev | |
uses: actions/checkout@v2 | |
with: | |
repository: Pronovix/docker-drupal-dev | |
path: ./drupal-dev | |
- name: Setup environment | |
run: | | |
mkdir build | |
sudo chown runneradmin build | |
ln -s drupal-dev/docker-compose.yml . | |
ln -s drupal-dev/Dockerfile . | |
printf "COMPOSE_PROJECT_NAME=swagger_ui_formatter\n" > .env | |
- name: Create Docker containers | |
env: | |
PHP_IMAGE: ${{ matrix.php_image }} | |
DB_IMAGE: ${{ matrix.db_image }} | |
run: | | |
docker-compose pull --quiet | |
docker-compose up -d --build | |
- name: Install dependencies | |
run: | | |
chmod a+rw . | |
docker-compose exec -T php composer install --no-interaction --no-suggest --no-progress -d .. | |
chmod a+rw composer.json | |
docker-compose exec -T php composer require drupal/core:${{ matrix.drupal_version }} drupal/core-dev:${{ matrix.drupal_version }} drupal/core-recommended:${{ matrix.drupal_version }} drupal/core-composer-scaffold:${{ matrix.drupal_version }} --no-update -d .. | |
docker-compose exec --env COMPOSER_DISCARD_CHANGES=true -T php composer update --no-progress ${{ matrix.lowest_highest }} -d .. | |
- name: List installed dependencies | |
run: docker-compose exec -T php composer show -d .. | |
- name: Set up Drupal settings files | |
run: | | |
sudo chown -R runner build/web/sites | |
ln -s ../../../../drupal-dev/drupal/settings.php build/web/sites/default/settings.php | |
ln -s ../../../../drupal-dev/drupal/settings.shared.php build/web/sites/default/settings.shared.php | |
ln -s ../../../../drupal-dev/drupal/settings.testing.php build/web/sites/default/settings.testing.php | |
ln -s ../../../drupal-dev/drupal/development.services.yml.dist build/web/sites/development.services.yml.dist | |
sudo chown -R runneradmin build/web/sites | |
- name: Run tests | |
run: RUN_PHPUNIT_TESTS="true" ./.dev/.ci/run-phpunit-tests.sh |