Skip to content

Commit 9b9c987

Browse files
authored
Merge pull request #22 from WyriHaximus/next-gen-qa-7.4
Next Gen QA (PHP 7.4)
2 parents 3196dc0 + 20dbe40 commit 9b9c987

30 files changed

+7474
-3191
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @WyriHaximus

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github: WyriHaximus
1+
github: WyriHaximus

.github/boring-cyborg.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
labelPRBasedOnFilePath:
2+
"Documentation 📚":
3+
- README.md
4+
- CONTRIBUTING.md
5+
"Dependencies 📦":
6+
- Dockerfile*
7+
- composer.*
8+
- package.json
9+
- package-lock.json
10+
- yarn.lock
11+
"Docker 🐳":
12+
- Dockerfile*
13+
- .docker/**/*
14+
"Image 🖼":
15+
- "**/*.gif"
16+
- "**/*.jpg"
17+
- "**/*.jpeg"
18+
- "**/*.png"
19+
- "**/*.webp"
20+
"CSS 👩‍🎨":
21+
- "**/*.css"
22+
"HTML 👷‍♀️":
23+
- "**/*.htm"
24+
- "**/*.html"
25+
"NEON 🦹‍♂️":
26+
- "**/*.neon"
27+
"MarkDown 📝":
28+
- "**/*.md"
29+
"YAML 🍄":
30+
- "**/*.yml"
31+
- "**/*.yaml"
32+
"JSON 👨‍💼":
33+
- "**/*.json"
34+
"Go 🐹":
35+
- "**/*.go"
36+
"JavaScript 🦏":
37+
- "**/*.js"
38+
- package.json
39+
- package-lock.json
40+
- yarn.lock
41+
"PHP 🐘":
42+
- "**/*.php"
43+
- composer.*
44+
"Configuration ⚙":
45+
- .github/*
46+
"CI 🚧":
47+
- .github/workflows/*
48+
- .scrutinizer.yml
49+
"Templates 🌲":
50+
- "**/*.twig"
51+
- "**/*.tpl"
52+
"Helm ☸":
53+
- .helm/**/*
54+
"Tests 🧪":
55+
- tests/**/*
56+
"Source 🔮":
57+
- src/**/*
58+
59+
labelerFlags:
60+
labelOnPRUpdates: true

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "composer"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
time: "03:00"
8+
labels:
9+
- "Dependabot 🤖"
10+
versioning-strategy: "increase"

.github/settings.yml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
repository:
2+
private: false
3+
has_issues: true
4+
has_wiki: false
5+
has_downloads: true
6+
default_branch: master
7+
allow_squash_merge: false
8+
allow_merge_commit: true
9+
allow_rebase_merge: false
10+
11+
# Labels: define labels for Issues and Pull Requests
12+
labels:
13+
- name: "Dependabot 🤖"
14+
color: 0366d6
15+
- name: "Dependencies 📦"
16+
color: 0025ff
17+
description: "Pull requests that update a dependency file"
18+
- name: "Image 🖼"
19+
color: 00ffff
20+
- name: "HTML 👷‍♀️"
21+
color: ffffff
22+
- name: "CSS 👩‍🎨"
23+
color: b3b3b3
24+
- name: "JavaScript 🦏"
25+
color: ffff00
26+
- name: "Go 🐹"
27+
color: 00ADD8
28+
- name: "JSON 👨‍💼"
29+
color: 00ADD8
30+
- name: "NEON 🦹‍♂️"
31+
color: CE3262
32+
- name: "MarkDown 📝"
33+
color: 000000
34+
- name: "YAML 🍄"
35+
color: ff1aff
36+
- name: "Templates 🌲"
37+
color: 009933
38+
- name: "Helm ☸"
39+
color: 091C84
40+
- name: "Tests 🧪"
41+
color: ffe6e6
42+
- name: "Source 🔮"
43+
color: e6ffe6
44+
- name: "Configuration ⚙"
45+
color: b3b3cc
46+
- name: "PHP 🐘"
47+
color: 8892BF
48+
description: "Hypertext Pre Processor"
49+
- name: "Docker 🐳"
50+
color: 0db7ed
51+
description: "Pull requests that relate to Docker"
52+
- name: "CI 🚧"
53+
color: ffff00
54+
- name: "Feature 🏗"
55+
color: 66ff99
56+
- name: "Documentation 📚"
57+
color: 6666ff
58+
- name: "Security 🕵️‍♀️"
59+
color: ff0000
60+
- name: "Hacktoberfest 🎃"
61+
color: 152347
62+
- name: "Bug 🐞"
63+
color: d73a4a
64+
description: "Something isn't working"
65+
oldname: bug
66+
- name: "Duplicate ♊"
67+
color: cfd3d7
68+
description: "This issue or pull request already exists"
69+
oldname: duplicate
70+
- name: "Enhancement ✨"
71+
color: a2eeef
72+
description: "New feature or request"
73+
oldname: enhancement
74+
- name: "Good First Issue"
75+
color: 7057ff
76+
description: "Good for newcomers"
77+
oldname: "good first issue"
78+
- name: "Help Wanted"
79+
color: 008672
80+
description: "Extra attention is needed"
81+
oldname: "help wanted"
82+
- name: Invalid
83+
color: e4e669
84+
description: "This doesn't seem right"
85+
oldname: invalid
86+
- name: "Question ❓"
87+
color: d876e3
88+
description: "Further information is requested"
89+
oldname: question
90+
- name: "Will not be fixed 🛑"
91+
color: ffffff
92+
description: "This will not be worked on"
93+
oldname: wontfix
94+
- name: "Sponsor Request ❤️"
95+
color: fedbf0
96+
description: "Issue/PR opened by sponsor"
97+
98+
branches:
99+
- name: master
100+
protection:
101+
required_pull_request_reviews:
102+
required_approving_review_count: 1
103+
dismiss_stale_reviews: true
104+
require_code_owner_reviews: true
105+
# Required. Require status checks to pass before merging. Set to null to disable
106+
required_status_checks:
107+
# Required. Require branches to be up to date before merging.
108+
strict: true
109+
# Required. The list of status checks to require in order to merge into this branch
110+
contexts: [
111+
"Milestone Check",
112+
"✔️"
113+
]
114+
# Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable.
115+
enforce_admins: true
116+
# Required. Restrict who can push to this branch. Team and user restrictions are only available for organization-owned repositories. Set to null to disable.
117+
restrictions:
118+
apps: []
119+
users: []
120+
teams: []

.github/workflows/ci.yml

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
name: Continuous Integration
2+
on:
3+
push:
4+
branches:
5+
- 'main'
6+
- 'master'
7+
- 'refs/heads/v[0-9]+.[0-9]+.[0-9]+'
8+
pull_request:
9+
jobs:
10+
package-name:
11+
name: Package Name
12+
runs-on: ubuntu-latest
13+
needs:
14+
- lint-json
15+
outputs:
16+
package-name: ${{ steps.package-name.outputs.package-name }}
17+
steps:
18+
- uses: actions/checkout@v1
19+
- id: package-name
20+
run: |
21+
printf "::set-output name=package-name::[\"%s\"]" $(docker run --rm -v "`pwd`:`pwd`" jess/jq jq -r -c '.name' "${GITHUB_WORKSPACE}/composer.json")
22+
supported-versions-matrix:
23+
name: Supported Versions Matrix
24+
runs-on: ubuntu-latest
25+
needs:
26+
- lint-yaml
27+
- lint-json
28+
outputs:
29+
version: ${{ steps.supported-versions-matrix.outputs.version }}
30+
steps:
31+
- uses: actions/checkout@v1
32+
- id: supported-versions-matrix
33+
uses: WyriHaximus/github-action-composer-php-versions-in-range@v1
34+
with:
35+
upcomingReleases: true
36+
supported-checks-matrix:
37+
name: Supported Checks Matrix
38+
runs-on: ubuntu-latest
39+
needs:
40+
- lint-yaml
41+
outputs:
42+
check: ${{ steps.supported-checks-matrix.outputs.check }}
43+
steps:
44+
- uses: actions/checkout@v1
45+
- id: supported-checks-matrix
46+
name: Generate check
47+
run: |
48+
printf "Checks found: %s\r\n" $(make task-list-ci)
49+
printf "::set-output name=check::%s" $(make task-list-ci)
50+
can-require:
51+
name: Test we can require "${{ matrix.package-name }}" on PHP ${{ matrix.php }}
52+
strategy:
53+
fail-fast: false
54+
matrix:
55+
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
56+
package-name: ${{ fromJson(needs.package-name.outputs.package-name) }}
57+
needs:
58+
- lint-yaml
59+
- lint-json
60+
- package-name
61+
- supported-versions-matrix
62+
runs-on: ubuntu-latest
63+
container:
64+
image: ghcr.io/wyrihaximusnet/php:${{ matrix.php }}-nts-buster-dev-root
65+
steps:
66+
- uses: actions/checkout@v2
67+
with:
68+
path: checked_out_package
69+
- name: Set Up composer.json
70+
run: |
71+
echo "{\"repositories\": [{\"name\": \"${{ matrix.package-name }}\",\"type\": \"path\",\"url\": \"./checked_out_package\"}]}" > composer.json
72+
- name: Require package
73+
run: |
74+
composer require "${{ matrix.package-name }}:dev-${GITHUB_SHA}" --no-progress --ansi --no-interaction --prefer-dist -o || composer require "${{ matrix.package-name }}:dev-${GITHUB_REF_NAME}" --no-progress --ansi --no-interaction --prefer-dist -o
75+
qa:
76+
name: Run ${{ matrix.check }} on PHP ${{ matrix.php }} with ${{ matrix.composer }} dependency preference
77+
strategy:
78+
fail-fast: false
79+
matrix:
80+
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
81+
composer: [lowest, locked, highest]
82+
check: ${{ fromJson(needs.supported-checks-matrix.outputs.check) }}
83+
needs:
84+
- lint-yaml
85+
- lint-json
86+
- supported-checks-matrix
87+
- supported-versions-matrix
88+
runs-on: ubuntu-latest
89+
container:
90+
image: ghcr.io/wyrihaximusnet/php:${{ matrix.php }}-nts-buster-dev-root
91+
steps:
92+
- uses: actions/checkout@v1
93+
- uses: ramsey/composer-install@v2
94+
with:
95+
dependency-versions: ${{ matrix.composer }}
96+
- name: Fetch Tags
97+
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true
98+
if: matrix.check == 'backward-compatibility-check'
99+
- run: make ${{ matrix.check }}
100+
env:
101+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
102+
COVERALLS_RUN_LOCALLY: ${{ secrets.COVERALLS_RUN_LOCALLY }}
103+
tests-directly-on-os:
104+
name: Run tests on PHP ${{ matrix.php }} with ${{ matrix.composer }} dependency preference (${{ matrix.os }})
105+
strategy:
106+
fail-fast: false
107+
matrix:
108+
os: [ubuntu-latest, windows-latest, macos-latest]
109+
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
110+
composer: [lowest, locked, highest]
111+
needs:
112+
- lint-yaml
113+
- lint-json
114+
- supported-checks-matrix
115+
- supported-versions-matrix
116+
runs-on: ${{ matrix.os }}
117+
steps:
118+
- uses: actions/checkout@v1
119+
- uses: shivammathur/setup-php@v2
120+
with:
121+
php-version: ${{ matrix.php }}
122+
coverage: pcov
123+
extensions: intl, sodium
124+
- uses: ramsey/composer-install@v2
125+
with:
126+
dependency-versions: ${{ matrix.composer }}
127+
- run: |
128+
make unit-testing-raw
129+
env:
130+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
131+
COVERALLS_RUN_LOCALLY: ${{ secrets.COVERALLS_RUN_LOCALLY }}
132+
lint-yaml:
133+
name: Lint YAML
134+
runs-on: ubuntu-latest
135+
steps:
136+
- uses: actions/checkout@v1
137+
- name: yaml-lint
138+
uses: ibiqlik/action-yamllint@v3
139+
with:
140+
config_data: |
141+
extends: default
142+
ignore: |
143+
/.git/
144+
rules:
145+
line-length: disable
146+
document-start: disable
147+
truthy: disable
148+
lint-json:
149+
name: Lint JSON
150+
runs-on: ubuntu-latest
151+
steps:
152+
- uses: actions/checkout@v1
153+
- name: json-syntax-check
154+
uses: limitusus/json-syntax-check@v1
155+
with:
156+
pattern: "\\.json$"
157+
check-mark:
158+
name: ✔️
159+
needs:
160+
- lint-yaml
161+
- lint-json
162+
- can-require
163+
- qa
164+
- tests-directly-on-os
165+
runs-on: ubuntu-latest
166+
steps:
167+
- run: echo "✔️"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Composer Diff
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- synchronize
7+
- reopened
8+
permissions:
9+
pull-requests: write
10+
jobs:
11+
comment-composer-lock-diff:
12+
name: Comment composer.lock diff
13+
runs-on: ubuntu-latest
14+
steps:
15+
## Use v1 as it will do a full checkout, where v2 will only do a partial and not fetch all heads, two of which
16+
## we need to create the diff between the PR's branch and the PR's target branch.
17+
- uses: actions/checkout@v1
18+
- name: Comment composer.lock diff
19+
uses: WyriHaximus/github-action-composer.lock-diff@v1
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)