-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
3,381 additions
and
1,077 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Creative CI | ||
|
||
# Run this workflow every time a new commit pushed to your repository | ||
on: push | ||
|
||
jobs: | ||
# Set the job key. The key is displayed as the job name | ||
# when a job name is not provided | ||
ci: | ||
strategy: | ||
matrix: | ||
operating-system: [ ubuntu-latest, macos-latest ] | ||
php-versions: [ '7.4' ] | ||
# Name the Job | ||
name: Lint code base | ||
# Set the type of machine to run on | ||
runs-on: ${{ matrix.operating-system }} | ||
|
||
steps: | ||
# Checks out a copy of your repository on the ubuntu-latest machine | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: ast, iconv, json, mbstring, pdo, tokenizer | ||
coverage: xdebug #optional | ||
ini-values: zend.assertions=1,assert.exception=1 | ||
env: | ||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache composer dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
# Use composer.json for key, if composer.lock is not committed. | ||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Install dependencies | ||
run: make install | ||
|
||
- name: Build the project | ||
run: make build | ||
|
||
- name: Coverage report | ||
if: ${{ matrix.operating-system == 'ubuntu-latest' && matrix.php-versions == '7.4' }} | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
make coverage |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
composer.phar | ||
nbproject/ | ||
phpunit.phar | ||
/vendor/ | ||
NOTES.md | ||
.phpunit.result.cache | ||
tmp/report/* | ||
vendor/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "docker"] | ||
path = docker | ||
url = https://github.com/abterphp/docker-configs |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
filter: | ||
excluded_paths: | ||
- 'vendor/*' | ||
|
||
build: | ||
environment: | ||
php: | ||
version: 7.4 |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,36 @@ | ||
install: | ||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | ||
php -r "if (hash_file('sha384', 'composer-setup.php') === 'baf1608c33254d00611ac1705c1d9958c817a1a33bce370c0595974b342601bd80b92a3f46067da89e3b06bff421f182') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | ||
php composer-setup.php | ||
php -r "unlink('composer-setup.php');" | ||
php composer.phar install | ||
ifeq (,$(wildcard /usr/local/bin/composer)) | ||
./bin/composer-install.sh | ||
mv composer.phar /usr/local/bin/composer | ||
endif | ||
ifeq (,$(wildcard /usr/local/bin/php-coveralls)) | ||
curl -L --output php-coveralls.phar https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.3/php-coveralls.phar | ||
mv php-coveralls.phar /usr/local/bin/php-coveralls | ||
chmod +x /usr/local/bin/php-coveralls | ||
endif | ||
XDEBUG_MODE=off composer install --no-progress --prefer-dist --optimize-autoloader | ||
|
||
update: | ||
php composer.phar update | ||
XDEBUG_MODE=off composer update | ||
|
||
build: | ||
./vendor/bin/phpunit | ||
./vendor/bin/phpcs src | ||
./vendor/bin/phpcs -p --colors --cache --standard=PSR12 tests | ||
./vendor/bin/phpmd src text .phpmd.xml | ||
PHAN_DISABLE_XDEBUG_WARN=1 ./vendor/bin/phan --color | ||
XDEBUG_MODE=off ./vendor/bin/phpunit | ||
XDEBUG_MODE=off ./vendor/bin/phpcs -p --colors --cache src | ||
XDEBUG_MODE=off ./vendor/bin/phpcs -p --colors --cache --standard=PSR12 tests | ||
XDEBUG_MODE=off ./vendor/bin/phpmd src text .phpmd.xml | ||
XDEBUG_MODE=off ./vendor/bin/phan --color | ||
|
||
precommit: | ||
git diff --cached --name-only --diff-filter=ACM | grep \\.php | xargs -n 1 php -l | ||
./vendor/bin/phpunit | ||
./vendor/bin/phpcs src | ||
./vendor/bin/phpcs -p --colors --cache --standard=PSR12 tests | ||
XDEBUG_MODE=off ./vendor/bin/phpunit | ||
XDEBUG_MODE=off ./vendor/bin/phpcs -p --colors --cache src | ||
XDEBUG_MODE=off ./vendor/bin/phpcs -p --colors --cache --standard=PSR12 tests | ||
|
||
unit: | ||
./vendor/bin/phpunit | ||
XDEBUG_MODE=off ./vendor/bin/phpunit | ||
|
||
coverage: | ||
./vendor/bin/phpunit -c phpunit-cov.xml | ||
XDEBUG_MODE=coverage ./vendor/bin/phpunit -c phpunit-cov.xml | ||
XDEBUG_MODE=off php-coveralls -vvv --coverage_clover=./tmp/report/clover.xml --json_path=./tmp/report/coveralls-upload.json | ||
|
||
.PHONY: install update build precommit unit integration coverage |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
https://github.com/BlackrockDigital/startbootstrap-creative | ||
# AbterPHP Website Creative | ||
|
||
[![Build Status](https://github.com/abterphp/website-creative/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/abterphp/website-creative/actions) | ||
|
||
This project adjusts the [Website module](https://github.com/abtercms/website) of [AbterPHP](https://github.com/abtercms/abterphp) to | ||
use the [Creative theme](https://github.com/BlackrockDigital/startbootstrap-creative) from [Start Bootstrap](https://startbootstrap.com/). |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" | ||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | ||
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" | ||
|
||
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ] | ||
then | ||
>&2 echo 'ERROR: Invalid installer checksum' | ||
rm composer-setup.php | ||
exit 1 | ||
fi | ||
|
||
php composer-setup.php --quiet | ||
RESULT=$? | ||
rm composer-setup.php | ||
exit $RESULT |
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
Oops, something went wrong.