{"id":14968579,"url":"https://github.com/lullabot/drupal9ci","last_synced_at":"2025-10-26T02:31:26.373Z","repository":{"id":38043016,"uuid":"112190554","full_name":"Lullabot/drupal9ci","owner":"Lullabot","description":"Command Line Interface for implementing Continuous Integration in Drupal 9","archived":true,"fork":false,"pushed_at":"2024-10-03T13:41:14.000Z","size":2610,"stargazers_count":160,"open_issues_count":0,"forks_count":54,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-02-09T22:23:33.625Z","etag":null,"topics":["ci","circleci","composer-drupal","continuous-integration","coverage","drupal","github-actions","gitlab-ci","travis-ci","workflow"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lullabot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-27T11:56:30.000Z","updated_at":"2024-12-12T18:00:19.000Z","dependencies_parsed_at":"2024-09-23T02:40:40.138Z","dependency_job_id":null,"html_url":"https://github.com/Lullabot/drupal9ci","commit_stats":{"total_commits":238,"total_committers":15,"mean_commits":"15.866666666666667","dds":0.5252100840336135,"last_synced_commit":"63deb1ce89db834869d3ba389887208d1666e697"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lullabot%2Fdrupal9ci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lullabot%2Fdrupal9ci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lullabot%2Fdrupal9ci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lullabot%2Fdrupal9ci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lullabot","download_url":"https://codeload.github.com/Lullabot/drupal9ci/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238247985,"owners_count":19440879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci","circleci","composer-drupal","continuous-integration","coverage","drupal","github-actions","gitlab-ci","travis-ci","workflow"],"created_at":"2024-09-24T13:40:10.296Z","updated_at":"2025-10-26T02:31:20.997Z","avatar_url":"https://github.com/Lullabot.png","language":"Shell","readme":"_This project is now archived and unmaintained._ Feel free to fork and contact us elsewhere if you would like to take this project over.\n\nLullabot's current CI tooling focus takes place in [lullabot/drainpipe](https://github.com/lullabot/drainpipe/). Join us there!\n\n# Drupal 9 CI\n\n[![Test](https://github.com/Lullabot/drupal9ci/actions/workflows/test.yml/badge.svg)](https://github.com/Lullabot/drupal9ci/actions/workflows/test.yml)\n[![Create release](https://github.com/Lullabot/drupal9ci/actions/workflows/create-release.yml/badge.svg)](https://github.com/Lullabot/drupal9ci/actions/workflows/create-release.yml)\n[![Publish Docker image](https://github.com/Lullabot/drupal9ci/actions/workflows/publish-docker-image.yml/badge.svg)](https://github.com/Lullabot/drupal9ci/actions/workflows/publish-docker-image.yml)\n[![codecov](https://codecov.io/gh/Lullabot/drupal9ci/branch/master/graph/badge.svg?token=akwlXfbC0W)](https://codecov.io/gh/Lullabot/drupal9ci)\n\nThis repository provides the foundation to implement [Continuous Integration](https://en.wikipedia.org/wiki/Continuous_integration) in a Drupal 9\nproject using any of the following CI providers:\n\n * [CircleCI](#circleci)\n * [Travis CI](#travis-ci)\n * [GitLab CI](#gitlab-ci)\n * [GitHub Actions](#github-actions)\n * [Bitbucket Pipelines](#bitbucket)\n\nIf you want to test an individual module instead of a Drupal project, see Andrew Berry's\n[drupal_tests](https://github.com/deviantintegral/drupal_tests).\n\nHere is a clip that shows [how it works for CircleCI](https://www.youtube.com/watch?v=wd_5mX0x4K8).\n\n## Requirements\n\nThe scripts assume that you have a Drupal 9 project created using [drupal-project](https://github.com/drupal-composer/drupal-project),\nwhich sets a well known foundation. If your project's directory\nstructure differs from what _drupal-project_ sets up, you will need to\nadjust the CI scripts.\n\nIt's also recommended to adjust your project to add a subset of the `settings.php` file into\nversion control and rely on `settings.local.php` for setting the database connection. The CI scripts\nhave their own `settings.local.php` which is copied at build time into `web/sites/default`.\n\n#### DocumentRoot: web vs docroot\n\nBy default, Apache and the rest of the code is set up to have the `DocumentRoot` folder as `web`. If\nyour project uses `docroot` instead, the easiest thing to do is to symlink one to the other. This can be\ndone adding a line like [this one](https://github.com/Lullabot/drupal9ci/blob/master/dist/bitbucket/RoboFile.php#L187)\nbefore running Apache (you will need to adapt paths).\n\nAlternatively you can go through the files and replace as needed. You can see a list of affected files in\n[this comment](https://github.com/Lullabot/drupal9ci/issues/74#issuecomment-884238645).\n\n## Installation\n\n### [CircleCI](https://circleci.com)\n\n[Demo repository](https://github.com/juampynr/drupal8-circleci) | [Deep dive article](https://www.lullabot.com/articles/continuous-integration-drupal-8-circleci)\n\nDownload the `drupal9ci` binary from https://github.com/Lullabot/drupal9ci/releases into the project root\nand run the command as `./drupal9ci` and select CircleCI. Once complete, continue below to complete the setup.\n\nSign up at [CircleCI](https://circleci.com/) and allow access to your project's repository.\n\n![CircleCI watch](docs/images/circleci-watch.png)\n\nHappy CI-ing! :-D. From now every time you create a pull request, CircleCI will run the\nset of jobs and report their result like in the following screenshot:\n\n![CircleCI pull request](docs/images/circleci-pr.png)\n\nFor an overview of the CircleCI features, have a look at\n[this article from the Lullabot blog](https://www.lullabot.com/articles/continuous-integration-drupal-8-circleci).\n\n#### Using a custom Docker image\n\nThe [CircleCI configuration file](dist/circleci/.circleci/config.yml) uses a\n[custom Docker image](https://github.com/Lullabot/drupal9ci/pkgs/container/drupal9ci) that extends from\nthe [official Drupal image](https://hub.docker.com/_/drupal/). If this image\ndoes not fit your project's architecture then consider [creating your own image](https://circleci.com/docs/2.0/custom-images/)\nbased out of it.\n\n### [Travis CI](https://travis-ci.org)\n\n[Demo repository](https://github.com/juampynr/drupal8-travis-ci) | [Deep dive article](https://www.lullabot.com/articles/continuous-integration-in-drupal-8-with-travis-ci)\n\nDownload the `drupal9ci` binary from https://github.com/Lullabot/drupal9ci/releases into the project root\nand run the command as `./drupal9ci` and select Travis CI. Once complete, continue below to complete the setup.\n\nSign up at [Travis CI](https://travis-ci.com/) and allow access to your project's repository:\n\n![Travis watch](docs/images/travis-watch.png)\n\nHappy CI-ing! :-D. From now on every pull request will trigger a build in Travis and its\nprogress will be visible like in the following screenshot:\n\n![Travis pull request](docs/images/travis-pr.png)\n\nFor you to see the result of the individual jobs, you need to click at the Details link\nfrom the above screenshot:\n\n![Travis CI jobs](docs/images/travis-jobs.png)\n\n#### Setting up code coverage reports\n\n[Coveralls.io](https://coveralls.io/) is a third party tool that can host and present\nPHPUnit code coverage reports in a neat way within a pull request. Here is how to set it up:\n\nRegister at https://coveralls.io using your GitHub account and then add your repository\nlike in the following screenshot:\n\n![Coveralls add repository](docs/images/coveralls-add-repo.png)\n\nThen take the chance to adjust a couple settings to get cleaner feedback in pull\nrequests:\n\n![Coveralls settings](docs/images/coveralls-settings.png)\n\nThat's it! Here is a sample report which you can see by clicking at Details\nat the pull request's status message:\n\n![Coveralls report](docs/images/coveralls-report.png)\n\n\n### [GitLab CI](https://about.gitlab.com/features/gitlab-ci-cd/)\n\n[Demo repository](https://gitlab.com/juampynr/drupal8-gitlab) | [Deep dive article](https://www.lullabot.com/articles/installer-drupal-8-and-gitlab-ci)\n\nDownload the `drupal9ci` binary from https://github.com/Lullabot/drupal9ci/releases into the project root\nand run the command as `./drupal9ci` and select GitLab CI. Once complete, continue below to complete the setup.\n\nReview, commit, and push the resulting changes. After doing that, navigate to the project's homepage\nat GitLab and open the CI / CD \u003e\u003e Pipelines section. You should see a running pipeline like\nthe following one:\n\n![GitLab pipeline](docs/images/gitlab-pipeline.png)\n\n### [GitHub Actions](https://github.com/features/actions)\n\n[Demo repository](https://github.com/juampynr/drupal8-github-actions)\n\nDownload the `drupal9ci` binary from https://github.com/Lullabot/drupal9ci/releases into the project root\nand run the command as `./drupal9ci` and select GitHub Actions. Once complete, continue below to complete the setup.\n\nReview, commit, and push the resulting changes. After doing that, navigate to the repository's homepage\nat GitHub and open the Actions tab. You should see a running workflow like the following one:\n\n![Github actions](docs/images/github-actions.png)\n\n\n### [Bitbucket](https://support.atlassian.com/bitbucket-cloud/docs/get-started-with-bitbucket-pipelines)\n\nDownload the `drupal9ci` binary from https://github.com/Lullabot/drupal9ci/releases into the project root\nand run the command as `./drupal9ci` and select Bitbucket. Once complete, continue below to complete the setup.\n\nReview, commit, and push the resulting changes. After doing that, navigate to the repository's homepage\nat Bitbucket and open the Pipelines tab. You should see a running workflow like the following one:\n\n![Bitbucket pipelines](docs/images/bitbucket.png)\n\n### Setting up the Behat and Cypress jobs for all platforms\n\nThe Behat and Cypress jobs require a running Drupal 9 site. The repository contains the code, but for running\ntests in a realistic environment you need:\n\n##### 1. A recent copy of the production environment's database\n\nThere are several ways to accomplish this:\n\n**Using a prepopulated Docker database image**\n\nSee [Achieve Rocketship-Fast Jobs in CircleCI by Preinstalling the Database](https://www.lullabot.com/articles/rocket-ship-fast-jobs-circleci-preinstalling-database)\n\n**Travis**\n\nIf you have Drush site aliases, and your repository is private, then follow these\ninstructions to [add an SSH key](https://docs.travis-ci.com/user/private-dependencies/#User-Key).\nNext, set up a drush site alias. Finally, adjust the Behat job to run `drush @my.alias sql-cli`.\n\n**CircleCI**\n\nIf you have Drush site aliases, then at the CircleCI dashboard go to the project's permissions\nand add an SSH key. Next, add `drush @my.alias sql-cli` to the Behat job at `.circleci/config.yml`.\n\n**Alternative**\n\nAlternatively, upload a [sanitized](https://drushcommands.com/drush-8x/sql/sql-sanitize/) database\ndump somewhere and set up the `DB_DUMP_URL` environment variable so the job can download it.\n\nFor example:\n![Travis CI db env var](docs/images/travisci-db-var.png)\n![CircleCI database via environment variable](docs/images/circleci-db-env.png)\n\nA sample implementation is to use Dropbox API. [See this repository for further details](https://github.com/juampynr/dropbox-api).\n\n##### 2. The production environment's files directory\n\nIf you have a site alias, then add `drush rsync @my.alias @self` to the Behat job. Alternatively,\nuse [Stage File Proxy](https://www.drupal.org/project/stage_file_proxy) module.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flullabot%2Fdrupal9ci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flullabot%2Fdrupal9ci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flullabot%2Fdrupal9ci/lists"}