Skip to content

Commit

Permalink
Setup (#1)
Browse files Browse the repository at this point in the history
Setup
  • Loading branch information
Lctrs committed Jan 23, 2020
2 parents 00b111f + 730d2a1 commit 4790053
Show file tree
Hide file tree
Showing 33 changed files with 491 additions and 1,319 deletions.
6 changes: 6 additions & 0 deletions .dependabot/config.yml
Expand Up @@ -3,6 +3,12 @@
version: 1

update_configs:
default_labels:
- "dependency"
directory: "/"
package_manager: "github_actions"
update_schedule: "daily"

- automerged_updates:
- match:
dependency_type: "development"
Expand Down
9 changes: 6 additions & 3 deletions .editorconfig
Expand Up @@ -7,13 +7,16 @@ indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.json]
[*.md]
trim_trailing_whitespace = false

[*.json{,.dist}]
indent_size = 2

[*.neon]
[*.neon{,.dist}]
indent_style = tab

[*.yml]
[*.{yml,yaml}{,.dist}]
indent_size = 2

[Makefile]
Expand Down
8 changes: 4 additions & 4 deletions .gitattributes
Expand Up @@ -4,10 +4,10 @@
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php_cs export-ignore
/infection.json export-ignore
/infection.json.dist export-ignore
/Makefile export-ignore
/phpcs.xml.dist export-ignore
/phpstan.neon.dist export-ignore
/phpstan-baseline.neon export-ignore
/phpstan.neon export-ignore
/psalm-baseline.xml export-ignore
/psalm.xml export-ignore
/psalm-baseline.xml export-ignore
4 changes: 1 addition & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
@@ -1,3 +1 @@
* @localheinz
composer.json @ergebnis-bot @localheinz
composer.lock @ergebnis-bot @localheinz
* @Lctrs
46 changes: 0 additions & 46 deletions .github/CODE_OF_CONDUCT.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Expand Up @@ -6,7 +6,7 @@ For details, see [`workflows/continuous-integration.yml`](workflows/continuous-i

## Coding Standards

We are using [`friendsofphp/php-cs-fixer`](https://github.com/FriendsOfPHP/PHP-CS-Fixer) to enforce coding standards.
We are using [`doctrine/coding-standard`](https://github.com/doctrine-coding-standard) to enforce coding standards.

Run

Expand Down
2 changes: 0 additions & 2 deletions .github/FUNDING.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,22 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: Lctrs

---

#### Steps required to reproduce the problem

1.
2.
3.

#### Expected Result

*

#### Actual Result

*
17 changes: 3 additions & 14 deletions .github/settings.yml
Expand Up @@ -31,18 +31,7 @@ branches:
- "codecov/patch"
- "codecov/project"
strict: false
restrictions:

# https://developer.github.com/v3/repos/branches/#parameters-1

# Note: User, app, and team restrictions are only available for organization-owned repositories.
# Set to null to disable when using this configuration for a repository on a personal account.

apps:
- "dependabot-preview"
teams: []
users:
- "ergebnis-bot"
restrictions: null

# https://developer.github.com/v3/issues/labels/#create-a-label
# https://developer.github.com/v3/issues/labels/#update-a-label
Expand Down Expand Up @@ -87,9 +76,9 @@ repository:
has_pages: false
has_projects: false
has_wiki: false
name: "php-library-template"
name: "php-library-skeleton"
private: false

# https://developer.github.com/v3/repos/branches/#remove-branch-protection

topics: "php, library, template"
topics: "php, library, template, skeleton"
2 changes: 1 addition & 1 deletion .github/workflows/continuous-deployment.yml
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: "Create release"
uses: "actions/create-release@v1.0.0"
env:
GITHUB_TOKEN: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
draft: false
prerelease: false
Expand Down
36 changes: 15 additions & 21 deletions .github/workflows/continuous-integration.yml
Expand Up @@ -63,18 +63,18 @@ jobs:
- name: "Run ergebnis/composer-normalize"
run: "composer normalize --dry-run"

- name: "Create cache directory for friendsofphp/php-cs-fixer"
run: "mkdir -p .build/php-cs-fixer"
- name: "Create cache directory for squizlabs/php_codesniffer"
run: "mkdir -p .build/php_codesniffer"

- name: "Cache cache directory for friendsofphp/php-cs-fixer"
- name: "Cache cache directory for squizlabs/php_codesniffer"
uses: "actions/cache@v1.0.3"
with:
path: ".build/php-cs-fixer"
key: "php-${{ matrix.php-version }}-php-cs-fixer-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-php-cs-fixer-"
path: ".build/php_codesniffer"
key: "php-${{ matrix.php-version }}-php_codesniffer-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-php_codesniffer-"

- name: "Run friendsofphp/php-cs-fixer"
run: "vendor/bin/php-cs-fixer fix --config=.php_cs --diff --diff-format=udiff --dry-run --verbose"
- name: "Run squizlabs/php_codesniffer"
run: "vendor/bin/phpcs"

dependency-analysis:
name: "Dependency Analysis"
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
run: "composer update --no-interaction --no-progress --no-suggest"

- name: "Run maglnet/composer-require-checker"
uses: "docker://webfactory/composer-require-checker:2.0.0"
run: "vendor/bin/composer-require-checker"

static-code-analysis:
name: "Static Code Analysis"
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
run: "mkdir -p .build/phpstan"

- name: "Run phpstan/phpstan"
run: "vendor/bin/phpstan analyse --configuration=phpstan.neon"
run: "vendor/bin/phpstan analyse --configuration=phpstan.neon.dist"

- name: "Create cache directory for vimeo/psalm"
run: "mkdir -p .build/psalm"
Expand Down Expand Up @@ -225,13 +225,13 @@ jobs:
run: "composer update --no-interaction --no-progress --no-suggest"

- name: "Run auto-review tests with phpunit/phpunit"
run: "vendor/bin/phpunit --configuration=test/AutoReview/phpunit.xml"
run: "vendor/bin/phpunit --configuration=test/AutoReview/phpunit.xml.dist"

- name: "Run unit tests with phpunit/phpunit"
run: "vendor/bin/phpunit --configuration=test/Unit/phpunit.xml"
run: "vendor/bin/phpunit --configuration=test/Unit/phpunit.xml.dist"

- name: "Run integration tests with phpunit/phpunit"
run: "vendor/bin/phpunit --configuration=test/Integration/phpunit.xml"
run: "vendor/bin/phpunit --configuration=test/Integration/phpunit.xml.dist"

code-coverage:
name: "Code Coverage"
Expand Down Expand Up @@ -277,7 +277,7 @@ jobs:
run: "composer update --no-interaction --no-progress --no-suggest"

- name: "Collect code coverage with pcov and phpunit/phpunit"
run: "vendor/bin/phpunit --configuration=test/Unit/phpunit.xml --coverage-clover=.build/logs/clover.xml"
run: "vendor/bin/phpunit --configuration=test/Unit/phpunit.xml.dist --coverage-clover=.build/logs/clover.xml"

- name: "Send code coverage report to Codecov.io"
env:
Expand Down Expand Up @@ -348,10 +348,4 @@ jobs:
uses: "hmarr/auto-approve-action@v2.0.0"
if: "(github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]') && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, 'Build(deps-dev)')"
with:
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"

- name: "Approve pull requests created by @ergebnis-bot that update the license year"
uses: "hmarr/auto-approve-action@v2.0.0"
if: "github.actor == 'ergebnis-bot' && github.event_name == 'pull_request' && github.event.pull_request.title == 'Enhancement: Update license year'"
with:
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
github-token: "${{ secrets.AUTO_APPROVE_TOKEN }}"
85 changes: 0 additions & 85 deletions .github/workflows/license.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/stale.yml

This file was deleted.

6 changes: 5 additions & 1 deletion .gitignore
@@ -1,2 +1,6 @@
/.build/
/.build
/test/*/phpunit.xml
/vendor/
/infection.json
/phpcs.xml
/phpstan.neon

0 comments on commit 4790053

Please sign in to comment.