Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI Integration Added. #1

Open
wants to merge 66 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
6f571ab
CI Integration Added.
bhanu951 Jun 4, 2021
293f34b
CI Integration Added.
bhanu951 Jun 4, 2021
4344b82
CI Integration Added.
bhanu951 Jun 4, 2021
5916aeb
CI Integration Added.
bhanu951 Jun 4, 2021
0bd4a90
CI Integration Added.
bhanu951 Jun 4, 2021
cef23ba
CI Integration Added.
bhanu951 Jun 4, 2021
9c19d4c
CI Integration Added.
bhanu951 Jun 4, 2021
17026c0
CI Integration Added.
bhanu951 Jun 4, 2021
cec62b4
CI Added.
bhanu951 Jun 7, 2021
8fa5d4d
CI Added.
bhanu951 Jun 7, 2021
ccf23d1
CI Added.
bhanu951 Jun 7, 2021
f071ce1
CI Added.
bhanu951 Jun 7, 2021
4fb8f8e
CI Added.
bhanu951 Jun 7, 2021
5cebfe1
CI Added.
bhanu951 Jun 7, 2021
a449b5d
CI Added.
bhanu951 Jun 7, 2021
e9bea73
CI Added.
bhanu951 Jun 7, 2021
fb06f36
CI Added.
bhanu951 Jun 7, 2021
8c251ed
CI Added.
bhanu951 Jun 7, 2021
c9e3e1f
CI Added.
bhanu951 Jun 7, 2021
aba2068
CI Added.
bhanu951 Jun 7, 2021
297a7a3
CI Added.
bhanu951 Jun 7, 2021
000a897
CI Added.
bhanu951 Jun 7, 2021
4534aa6
CI Added.
bhanu951 Jun 7, 2021
0c8764b
CI Added.
bhanu951 Jun 7, 2021
e0cd707
CI Added.
bhanu951 Jun 7, 2021
63d3f6a
CI Added.
bhanu951 Jun 7, 2021
d0d6227
CI Added.
bhanu951 Jun 7, 2021
548ed24
CI Added.
bhanu951 Jun 7, 2021
afd43af
CI Added.
bhanu951 Jun 7, 2021
4231cad
CI Added.
bhanu951 Jun 7, 2021
ac130b7
CI Added.
bhanu951 Jun 7, 2021
5770622
CI Added.
bhanu951 Jun 7, 2021
e13feb7
CI Added.
bhanu951 Jun 8, 2021
f73f462
CI Added.
bhanu951 Jun 8, 2021
b7cb703
CI Added.
bhanu951 Jun 8, 2021
9a281a8
CI Added.
bhanu951 Jun 8, 2021
68cf994
CI Added.
bhanu951 Jun 8, 2021
6c5bcd5
CI Added.
bhanu951 Jun 8, 2021
432764f
CI Added.
bhanu951 Jun 8, 2021
84b1cc0
CI Added.
bhanu951 Jun 8, 2021
ad7b439
CI Added.
bhanu951 Jun 8, 2021
fa608d0
CI Added.
bhanu951 Jun 8, 2021
b51bfa5
CI Added.
bhanu951 Jun 8, 2021
90853ab
CI Added.
bhanu951 Jun 8, 2021
a0f98a4
CI Added.
bhanu951 Jun 8, 2021
587aeec
CI Added.
bhanu951 Jun 8, 2021
4411a92
CI Added.
bhanu951 Jun 8, 2021
29d004b
CI Added.
bhanu951 Jun 8, 2021
c29648d
CI Added.
bhanu951 Jun 8, 2021
ee07c4b
CI Added.
bhanu951 Jun 8, 2021
b0b6de6
CI Added.
bhanu951 Jun 8, 2021
27fc8a5
CI Added.
bhanu951 Jun 8, 2021
9f19491
CI Added.
bhanu951 Jun 8, 2021
2a27a89
CI Added.
bhanu951 Jun 8, 2021
0dd6617
CI Added.
bhanu951 Jun 8, 2021
4fdaa65
CI Added.
bhanu951 Jun 8, 2021
c744356
CI Added.
bhanu951 Jun 8, 2021
96523c0
CI Added.
bhanu951 Jun 8, 2021
5de086c
Sql Lite Database Created.
bhanu951 Jun 8, 2021
18d974c
CI Added.
bhanu951 Jun 8, 2021
558b532
CI Added.
bhanu951 Jun 8, 2021
14a4345
CI Added.
bhanu951 Jun 8, 2021
13b5550
CI Added.
bhanu951 Jun 8, 2021
1625d62
CI Added.
bhanu951 Jun 8, 2021
97ffc8e
CI Added.
bhanu951 Jun 8, 2021
0bd1d72
CI Added.
bhanu951 Jun 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# Copy and rename this file to .env at root of this project.
#

# A common use case is to supply database credentials via the environment. Edit settings.php
# like so:
#
# $databases['default']['default'] = [
# 'database' => $_ENV['MYSQL_DATABASE'],
# 'driver' => 'mysql',
# 'host' => $_ENV['MYSQL_HOSTNAME'],
# 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
# 'password' => $_ENV['MYSQL_PASSWORD'],
# 'port' => $_ENV['MYSQL_PORT'],
# 'prefix' => '',
# 'username' => $_ENV['MYSQL_USER'],
# ];
#
# Uncomment and populate as needed.
# MYSQL_DATABASE=
# MYSQL_HOSTNAME=
# MYSQL_PASSWORD=
# MYSQL_PORT=
# MYSQL_USER=

# Another common use case is to set Drush's --uri via environment.
# DRUSH_OPTIONS_URI=http://example.com
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
time: "22:00"
open-pull-requests-limit: 10
98 changes: 98 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Build & Test Drupal

on: [push]

env:
COMPOSER_MEMORY_LIMIT: -1
SIMPLETEST_DB: sqlite://tmp/site.sqlite
SIMPLETEST_BASE_URL: "http://127.0.0.1:8080"

jobs:
build:
name: "Tests | PHP ${{ matrix.php-versions }} | Drupal ${{ matrix.drupal }}"
runs-on: "ubuntu-latest"
strategy:
matrix:
experimental: [false]
php-versions:
- "7.3"
- "7.4"
drupal:
- "^8.9"
steps:

- name: Checkout 🛎️
uses: actions/checkout@v2

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-versions }}"
tools: composer:v2
extensions: dom, curl, libxml, mbstring, zip, pdo, mysql, pdo_mysql, gd, pdo_sqlite

- name: Check PHP Version
run: php -v

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Update composer
run: composer --verbose self-update --${{ matrix.composer-channel }}

- name: Dump composer verson
run: composer --version

- name: Validate composer.json and composer.lock
run: composer --verbose validate --strict

- name: Remove vendor directory for integration testing
run: rm -rf vendor/ web/core/ web/modules/contrib web/themes/contrib web/profiles/contrib

- name: Install dependencies
run: |
composer --verbose install
echo "export PATH=$PATH:$GITHUB_WORKSPACE/vendor/bin" >> ~/.bash_profile

- run: ./vendor/bin/drush si standard --site-name='D8cards Test' --account-name=admin --account-pass=admin --account-mail='[email protected]' --sites-subdir=default --locale='uk' --verbose --yes --db-url=sqlite://tmp/site.sqlite

- run: ./vendor/bin/drush runserver $SIMPLETEST_BASE_URL &

- run: until curl -s $SIMPLETEST_BASE_URL; do true; done > /dev/null

# https://www.drupal.org/project/drupal/issues/3182653
# https://www.drupal.org/node/3176567
# - if: ${{ matrix.php-versions == '7.4' }} || ${{ matrix.php-versions == '8.0' }}
# run: composer require phpspec/prophecy-phpunit:^2 --with-all-dependencies

- name: Run a single unit test to verfiy the testing setup.
run: ./vendor/bin/phpunit -c ./web/core ./web/core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php

# - name: Checking Coding standards.
# run: ./vendor/bin/phpunit -c ./web/modules/custom ./web/themes/custom ./web/profiles/custom

# - name: Check Drupal best practices
# run: ./vendor/bin/phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml ./web/modules/custom ./web/themes/custom ./web/profiles/custom

- name: Checking Depreceated code.
run: |
./vendor/bin/drupal-check -vvv web/modules/custom
./vendor/bin/drupal-check -vvv web/themes/custom
./vendor/bin/drupal-check -vvv web/profiles/custom

- name: Checking Site Status.
run: ./vendor/bin/drush st

- name: Deployment Script
run: |
sudo chmod u+x deploy-script.sh
./deploy-script.sh
47 changes: 47 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This file contains default .gitignore rules. To use it, copy it to .gitignore,
# and it will cause files like your settings.php and user-uploaded files to be
# excluded from Git version control. This is a common strategy to avoid
# accidentally including private information in public repositories and patch
# files.
#
# Because .gitignore can be specific to your site, this file has a different
# name; updating Drupal core will not override your custom .gitignore file.

# Ignore core when managing all of a project's dependencies with Composer
# including Drupal core.
web/core/
web/modules/contrib/*
web/themes/contrib/*
web/profiles/contrib/*

# Ignore dependencies that are managed with Composer.
# Generally you should only ignore the root vendor directory. It's important
# that core/assets/vendor and any other vendor directories within contrib or
# custom module, theme, etc., are not ignored unless you purposely do so.
/vendor/
/logs/*.log

# Ignore configuration files that may contain sensitive information.
sites/*/settings*.php
sites/*/services*.yml

# Ignore paths that contain user-generated content.
sites/*/files
sites/*/private
web/sites/*/files/

# Ignore sensitive information
/web/sites/*/settings.php
/web/sites/*/settings.local.php

# Ignore SimpleTest multi-site environment
/web/sites/simpletest

# Ignore files generated by common IDEs
/.idea/
/.vscode/

# Ignore .env files as they are personal
/.env
/.editorconfig
/.gitattributes
202 changes: 132 additions & 70 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,132 @@
{
"name": "drupal/recommended-project",
"description": "Project template for Drupal 8 projects with a relocated document root",
"type": "project",
"license": "GPL-2.0-or-later",
"homepage": "https://www.drupal.org/project/drupal",
"support": {
"docs": "https://www.drupal.org/docs/user_guide/en/index.html",
"chat": "https://www.drupal.org/node/314178"
},
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
}
],
"require": {
"composer/installers": "^1.2",
"drupal/core-composer-scaffold": "^8.8",
"drupal/core-project-message": "^8.8",
"drupal/core-recommended": "^8.8"
},
"require-dev": {
"drupal/core-dev": "^8.8"
},
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"sort-packages": true
},
"extra": {
"drupal-scaffold": {
"locations": {
"web-root": "web/"
}
},
"installer-paths": {
"web/core": ["type:drupal-core"],
"web/libraries/{$name}": ["type:drupal-library"],
"web/modules/contrib/{$name}": ["type:drupal-module"],
"web/profiles/contrib/{$name}": ["type:drupal-profile"],
"web/themes/contrib/{$name}": ["type:drupal-theme"],
"drush/Commands/contrib/{$name}": ["type:drupal-drush"],
"web/modules/custom/{$name}": ["type:drupal-custom-module"],
"web/themes/custom/{$name}": ["type:drupal-custom-theme"]
},
"drupal-core-project-message": {
"include-keys": ["homepage", "support"],
"post-create-project-cmd-message": [
"<bg=blue;fg=white> </>",
"<bg=blue;fg=white> Congratulations, you’ve installed the Drupal codebase </>",
"<bg=blue;fg=white> from the drupal/recommended-project template! </>",
"<bg=blue;fg=white> </>",
"",
"<bg=yellow;fg=black>Next steps</>:",

" * Install the site: https://www.drupal.org/docs/8/install",
" * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
" * Get support: https://www.drupal.org/support",
" * Get involved with the Drupal community:",
" https://www.drupal.org/getting-involved",
" * Remove the plugin that prints this message:",
" composer remove drupal/core-project-message"
]
}
}
}
{
"name": "drupal/recommended-project",
"description": "Project template for Drupal 9 projects with Composer",
"type": "project",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "",
"role": ""
}
],
"repositories": [
{
"type": "package",
"package": {
"name": "bhanu951/example_codes",
"version": "8.x-dev",
"type": "drupal-custom-module",
"source": {
"url": "https://git.drupalcode.org/sandbox/Bhanu951-3103712.git",
"type": "git",
"reference": "8.x-dev"
}
}
},
{
"type": "composer",
"url": "https://packages.drupal.org/8"
},
{
"type": "composer",
"url": "https://asset-packagist.org"
}
],
"require": {
"php": ">=7.3",
"bhanu951/example_codes": "^8.x-dev",
"composer/installers": "^1.9",
"cweagans/composer-patches": "^1.7",
"drupal/core-composer-scaffold": "^8.8",
"drupal/core-project-message": "^8.8",
"drupal/core-recommended": "^8.8",
"drush/drush": "^10.3",
"vlucas/phpdotenv": "^5.1",
"webflo/drupal-finder": "^1.2"
},
"require-dev": {
"drupal/coder": "^8.3",
"drupal/core-dev": "^8.8",
"drupal/devel": "^4.1",
"drupal/devel_kint_extras": "^1.0",
"mglaman/drupal-check": "^1.1",
"mglaman/phpstan-drupal": "^0.12.10",
"zaporylie/composer-drupal-optimizations": "^1.2"
},
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"discard-changes": true,
"sort-packages": true
},
"autoload": {
"classmap": [
"scripts/composer/ScriptHandler.php"
],
"files": ["load.environment.php"]
},
"scripts": {
"pre-install-cmd": [
"DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
],
"pre-update-cmd": [
"DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
],
"post-install-cmd": [
"DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
],
"post-update-cmd": [
"DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
]
},
"extra": {
"enable-patching": true,
"drupal-scaffold": {
"locations": {
"web-root": "web/"
}
},
"installer-paths": {
"web/core": [
"type:drupal-core"
],
"web/libraries/{$name}": [
"type:drupal-library"
],
"web/modules/contrib/{$name}": [
"type:drupal-module"
],
"web/profiles/contrib/{$name}": [
"type:drupal-profile"
],
"web/themes/contrib/{$name}": [
"type:drupal-theme"
],
"drush/Commands/contrib/{$name}": [
"type:drupal-drush"
],
"web/modules/custom/{$name}": [
"type:drupal-custom-module"
],
"web/themes/custom/{$name}": [
"type:drupal-custom-theme"
],
"web/profiles/custom/{$name}": [
"type:drupal-custom-profile"
]
},
"composer-exit-on-patch-failure": true,
"patchLevel": {
"drupal/core": "-p2"
},
"patches": {
"bhanu951/example_codes": {
"Fix depreceated code in command examples" : "./patches/fix-depreceated-code-in-command-examples.patch",
"Fix depreceated code in queue examples" : "./patches/fix-depreceated-code-in-queue-examples.patch"
}
}
}
}
Loading