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 GitHub workflow initial #202

Merged
merged 2 commits into from
Oct 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 0 additions & 16 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: 'BUG '
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: 'FEATURE '
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
5 changes: 0 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

103 changes: 103 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

on:
push:
branches: [ '**' ]
pull_request:
branches: [ '**' ]

name: "CI"

jobs:
tests:
name: "Tests"

runs-on: "ubuntu-latest"

env:
php_extensions: ctype, dom, fileinfo, hash, intl, mbstring, session, simplexml, tokenizer, xml, pdo, mysqli, gd, zip

services:
mysql:
image: "mysql:5.7"
env:
MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_ROOT_PASSWORD:
MYSQL_DATABASE: test_db
ports:
- 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

strategy:
fail-fast: false
matrix:
php-version:
- "7.3"
- "7.4"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
extensions: "${{ env.php_extensions }}"
coverage: "xdebug"

- name: "Start mysql service"
run: "sudo /etc/init.d/mysql start"

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v1"
with:
path: "~/.composer/cache"
key: "php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}"
restore-keys: "php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Authorize private packagist"
env:
COMPOSER_TOKEN: ${{ secrets.COMPOSER_TOKEN }}
run: "if [[ $COMPOSER_TOKEN ]]; then composer config --global --auth http-basic.repo.packagist.com token $COMPOSER_TOKEN; fi"

- name: "Install dependencies with composer"
run: "composer install --no-ansi --no-interaction --no-progress"

- name: "Run tests with phpunit/phpunit"
env:
SS_DATABASE_PORT: ${{ job.services.mysql.ports['3306'] }}
run: "vendor/bin/phpunit --coverage-html=build/logs/coverage/html --coverage-xml=build/logs/coverage"

- name: "Archive code coverage results"
uses: "actions/upload-artifact@v2"
with:
name: "coverage"
path: "build/logs/coverage/html"

- name: "Run tests with squizlabs/php_codesniffer"
run: "vendor/bin/phpcs src/ tests/ --standard=phpcs.xml.dist --report=checkstyle --report-file=build/logs/checkstyle.xml"

- name: "Archive checkstyle results"
uses: "actions/upload-artifact@v2"
with:
name: "checkstyle"
path: "build/logs/checkstyle.xml"

#- name: "Run tests with phpmd/phpmd"
# run: "vendor/bin/phpmd src xml codesize,unusedcode,naming --reportfile build/logs/pmd.xml --exclude vendor/ --exclude autoload.php"

- name: "Run tests with phploc/phploc"
run: "vendor/bin/phploc --count-tests --exclude vendor/ --log-csv build/logs/phploc.csv --log-xml build/logs/phploc.xml src/ tests/
"
- name: "Run tests with pdepend/pdepend"
run: "vendor/bin/pdepend --jdepend-xml=build/logs/jdepend.xml --ignore=vendor src"

- name: "Publish documentation"
run: "vendor/bin/phpdox -f phpdox.xml"

- name: "Archive documentation"
uses: "actions/upload-artifact@v2"
with:
name: "documentation"
path: "docs/html"
10 changes: 3 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,11 @@ env:

matrix:
include:
- php: 5.6
env: DB=MYSQL RECIPE_VERSION=4.2.x-dev PHPUNIT_TEST=1
- php: 7.0
env: DB=PGSQL RECIPE_VERSION=4.2.x-dev PHPUNIT_TEST=1
- php: 7.1
env: DB=MYSQL RECIPE_VERSION=4.3.x-dev PHPUNIT_TEST=1 PHPCS_TEST=1
- php: 7.2
env: DB=PGSQL RECIPE_VERSION=4.4.x-dev PHPUNIT_TEST=1
env: DB=MYSQL RECIPE_VERSION=4.5.x-dev PHPUNIT_TEST=1 PHPCS_TEST=1
- php: 7.3
env: DB=PGSQL RECIPE_VERSION=4.6.x-dev PHPUNIT_TEST=1
- php: 7.4
env: DB=MYSQL RECIPE_VERSION=4.x-dev PHPUNIT_COVERAGE_TEST=1

before_script:
Expand Down
83 changes: 0 additions & 83 deletions Jenkinsfile

This file was deleted.