Skip to content

Enhancement: Synchronize with ergebnis/php-library-template #90

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

Merged
merged 1 commit into from
Jan 4, 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
15 changes: 4 additions & 11 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,12 @@
version: 1

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

- automerged_updates:
- match:
dependency_type: "development"
commit_message:
include_scope: true
prefix: "Build"
default_assignees:
- "localheinz"
default_labels:
Expand All @@ -24,5 +17,5 @@ update_configs:
- "localheinz"
directory: "/"
package_manager: "php:composer"
update_schedule: "daily"
update_schedule: "live"
version_requirement_updates: "increase_versions"
21 changes: 12 additions & 9 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
/.dependabot/ export-ignore
/.github/ export-ignore
/test/ export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php_cs export-ignore
/Makefile export-ignore
/phpstan.neon export-ignore
/.dependabot/ export-ignore
/.github/ export-ignore
/test/ export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php_cs export-ignore
/Makefile export-ignore
/phpstan-baseline.neon export-ignore
/phpstan.neon export-ignore
/psalm-baseline.xml export-ignore
/psalm.xml export-ignore
8 changes: 4 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ to run a dependency analysis.

## Static Code Analysis

We are using [`phpstan/phpstan`](https://github.com/phpstan/phpstan) to statically analyze the code.
We are using [`phpstan/phpstan`](https://github.com/phpstan/phpstan) and [`vimeo/psalm`](https://github.com/vimeo/psalm) to statically analyze the code.

Run

Expand All @@ -40,17 +40,17 @@ $ make static-code-analysis

to run a static code analysis.

We are also using the [baseline feature](https://medium.com/@ondrejmirtes/phpstans-baseline-feature-lets-you-hold-new-code-to-a-higher-standard-e77d815a5dff) of [`phpstan/phpstan`](https://github.com/phpstan/phpstan).
We are also using the baseline features of [`phpstan/phpstan`(https://medium.com/@ondrejmirtes/phpstans-baseline-feature-lets-you-hold-new-code-to-a-higher-standard-e77d815a5dff) and [`vimeo/psalm`](https://psalm.dev/docs/running_psalm/dealing_with_code_issues/#using-a-baseline-file).

Run

```
$ make static-code-analysis-baseline
```

to regenerate the baseline in [`../phpstan-baseline.neon`](../phpstan-baseline.neon).
to regenerate the baselines in [`../phpstan-baseline.neon`](../phpstan-baseline.neon) and [`../psalm-baseline.xml`](../psalm-baseline.xml).

:exclamation: Ideally, the baseline should shrink over time.
:exclamation: Ideally, the baselines should shrink over time.

## Tests

Expand Down
79 changes: 56 additions & 23 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# https://github.com/probot/settings

branches:
- name: master
- name: "master"

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

protection:
enforce_admins: false
required_pull_request_reviews:
Expand All @@ -10,50 +14,79 @@ branches:
required_approving_review_count: 1
required_status_checks:
contexts:
- "Coding Standards (7.2)"
- "Dependency Analysis (7.4)"
- "Static Code Analysis (7.4)"
- "Coding Standards (7.2, locked)"
- "Dependency Analysis (7.4, locked)"
- "Static Code Analysis (7.4, locked)"
- "Tests (7.2, lowest)"
- "Tests (7.2, locked)"
- "Tests (7.2, highest)"
- "Tests (7.3, lowest)"
- "Tests (7.3, locked)"
- "Tests (7.3, highest)"
- "Tests (7.4, lowest)"
- "Tests (7.4, locked)"
- "Tests (7.4, highest)"
- "codecov/patch"
- "codecov/project"
strict: false
restrictions: null
restrictions:
apps:
- "dependabot-preview"
teams: []
users: []

# https://developer.github.com/v3/issues/labels/#create-a-label
# https://developer.github.com/v3/issues/labels/#update-a-label

labels:
- name: bug
color: ee0701
- name: "bug"
color: "#ee0701"
description: ""

- name: dependency
color: 0366d6
- name: "dependency"
color: "#0366d6"
description: ""

- name: enhancement
color: 0e8a16
- name: "enhancement"
color: "#0e8a16"
description: ""

- name: rfc
color: f4db3a
- name: "rfc"
color: "#f4db3a"
description: ""

- name: question
color: cc317c
- name: "question"
color: "#cc317c"
description: ""

- name: security
color: ee0701
- name: "security"
color: "#ee0701"
description: ""

- name: stale
color: eeeeee
- name: "stale"
color: "#eeeeee"
description: ""

- name: vendor
color: f4db3a
- name: "vendor"
color: "#f4db3a"
description: ""

# https://developer.github.com/v3/repos/#edit

repository:
allow_merge_commit: true
allow_rebase_merge: false
allow_squash_merge: false
default_branch: master
default_branch: "master"
description: ":grapes: Provides constants for HTTP request methods."
has_downloads: true
has_issues: true
has_pages: false
has_projects: false
has_wiki: false
name: http-method
name: "http-method"
private: false

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

topics: "http, request, method"
29 changes: 29 additions & 0 deletions .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Continuous Deployment"

on:
push:
tags:
- "**"

jobs:
release:
name: "Release"

runs-on: "ubuntu-latest"

steps:
- name: "Determine tag"
id: "determine-tag"
run: "echo \"::set-output name=tag::${GITHUB_REF#refs/tags/}\""

- name: "Create release"
uses: "actions/[email protected]"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
draft: false
prerelease: false
release_name: "${{ steps.determine-tag.outputs.tag }}"
tag_name: "${{ steps.determine-tag.outputs.tag }}"
Loading