Skip to content

Commit 8f73823

Browse files
authored
Merge pull request #48 from php-api-clients/next-gen-qa
Next Gen QA
2 parents cc8cf7a + 9c29106 commit 8f73823

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+8303
-1801
lines changed

Diff for: .github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @WyriHaximus

Diff for: .github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: WyriHaximus

Diff for: .github/boring-cyborg.yml

+60
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

Diff for: .github/dependabot.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "composer"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
labels:
8+
- "Dependencies 📦"
9+
- "PHP 🐘"
10+
versioning-strategy: "widen"
11+
open-pull-requests-limit: 1

Diff for: .github/settings.yml

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

Diff for: .github/workflows/ci.yml

+183
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
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+
supported-versions-matrix:
11+
name: Supported Versions Matrix
12+
runs-on: ubuntu-latest
13+
needs:
14+
- lint-yaml
15+
- lint-json
16+
outputs:
17+
version: ${{ steps.supported-versions-matrix.outputs.version }}
18+
steps:
19+
- uses: actions/checkout@v1
20+
- id: supported-versions-matrix
21+
uses: WyriHaximus/github-action-composer-php-versions-in-range@v1
22+
supported-checks-matrix:
23+
name: Supported Checks Matrix
24+
runs-on: ubuntu-latest
25+
needs:
26+
- lint-yaml
27+
- composer-install
28+
outputs:
29+
check: ${{ steps.supported-checks-matrix.outputs.check }}
30+
steps:
31+
- uses: actions/checkout@v1
32+
- id: supported-checks-matrix
33+
name: Generate check
34+
run: |
35+
printf "Checks found: %s\r\n" $(make task-list-ci)
36+
printf "::set-output name=check::%s" $(make task-list-ci)
37+
composer-install:
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
42+
composer: [lowest, current, highest]
43+
needs:
44+
- lint-yaml
45+
- lint-json
46+
- supported-versions-matrix
47+
runs-on: ubuntu-latest
48+
container:
49+
image: ghcr.io/wyrihaximusnet/php:${{ matrix.php }}-nts-buster-dev-root
50+
steps:
51+
- uses: actions/checkout@v1
52+
- name: Cache composer packages
53+
uses: actions/cache@v1
54+
with:
55+
path: ./vendor/
56+
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
57+
- name: Install Dependencies
58+
run: composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o
59+
if: matrix.composer == 'lowest'
60+
- name: Install Dependencies
61+
run: composer install --ansi --no-progress --no-interaction --prefer-dist -o
62+
if: matrix.composer == 'current'
63+
- name: Install Dependencies
64+
run: composer update --ansi --no-progress --no-interaction --prefer-dist -o
65+
if: matrix.composer == 'highest'
66+
qa:
67+
name: Run ${{ matrix.check }} on PHP ${{ matrix.php }} with ${{ matrix.composer }} dependency preference (Linux)
68+
strategy:
69+
fail-fast: false
70+
matrix:
71+
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
72+
composer: [lowest, current, highest]
73+
check: ${{ fromJson(needs.supported-checks-matrix.outputs.check) }}
74+
needs:
75+
- lint-yaml
76+
- lint-json
77+
- composer-install
78+
- supported-checks-matrix
79+
- supported-versions-matrix
80+
runs-on: ubuntu-latest
81+
container:
82+
image: ghcr.io/wyrihaximusnet/php:${{ matrix.php }}-nts-buster-dev-root
83+
steps:
84+
- uses: actions/checkout@v1
85+
- name: Cache composer packages
86+
uses: actions/cache@v1
87+
with:
88+
path: ./vendor/
89+
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
90+
- name: Install Dependencies
91+
run: (test -f vendor && true ) || composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o
92+
if: matrix.composer == 'lowest'
93+
- name: Install Dependencies
94+
run: (test -f vendor && true ) || composer install --ansi --no-progress --no-interaction --prefer-dist -o
95+
if: matrix.composer == 'current'
96+
- name: Install Dependencies
97+
run: (test -f vendor && true ) || composer update --ansi --no-progress --no-interaction --prefer-dist -o
98+
if: matrix.composer == 'highest'
99+
- name: Fetch Tags
100+
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true
101+
if: matrix.check == 'backward-compatibility-check'
102+
- run: make ${{ matrix.check }}
103+
env:
104+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
105+
COVERALLS_RUN_LOCALLY: ${{ secrets.COVERALLS_RUN_LOCALLY }}
106+
unittests-directly-on-os:
107+
name: Run unit tests on PHP ${{ matrix.php }} with ${{ matrix.composer }} dependency preference (${{ matrix.os }})
108+
strategy:
109+
fail-fast: false
110+
matrix:
111+
os: [ubuntu-latest, windows-latest, macos-latest]
112+
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
113+
composer: [lowest, current, highest]
114+
needs:
115+
- lint-yaml
116+
- lint-json
117+
- composer-install
118+
- supported-versions-matrix
119+
runs-on: ${{ matrix.os }}
120+
steps:
121+
- uses: actions/checkout@v1
122+
- name: Setup PHP, extensions and composer with shivammathur/setup-php
123+
uses: shivammathur/setup-php@v2
124+
with:
125+
php-version: ${{ matrix.php }}
126+
coverage: xdebug, pcov
127+
- name: Cache composer packages
128+
uses: actions/cache@v1
129+
with:
130+
path: ./vendor/
131+
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
132+
- name: Install Dependencies
133+
run: (test -f vendor && true ) || composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o
134+
if: matrix.composer == 'lowest'
135+
- name: Install Dependencies
136+
run: (test -f vendor && true ) || composer install --ansi --no-progress --no-interaction --prefer-dist -o
137+
if: matrix.composer == 'current'
138+
- name: Install Dependencies
139+
run: (test -f vendor && true ) || composer update --ansi --no-progress --no-interaction --prefer-dist -o
140+
if: matrix.composer == 'highest'
141+
- name: Fetch Tags
142+
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true
143+
if: matrix.check == 'backward-compatibility-check'
144+
- run: |
145+
./vendor/bin/phpunit -c ./etc/qa/phpunit.xml
146+
env:
147+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
148+
COVERALLS_RUN_LOCALLY: ${{ secrets.COVERALLS_RUN_LOCALLY }}
149+
lint-yaml:
150+
name: Lint YAML
151+
runs-on: ubuntu-latest
152+
steps:
153+
- uses: actions/checkout@v1
154+
- name: yaml-lint
155+
uses: ibiqlik/action-yamllint@v3
156+
with:
157+
config_data: |
158+
extends: default
159+
ignore: |
160+
/.git/
161+
rules:
162+
line-length: disable
163+
document-start: disable
164+
truthy: disable
165+
lint-json:
166+
name: Lint JSON
167+
runs-on: ubuntu-latest
168+
steps:
169+
- uses: actions/checkout@v1
170+
- name: json-syntax-check
171+
uses: limitusus/json-syntax-check@v1
172+
with:
173+
pattern: "\\.json$"
174+
check-mark:
175+
name: ✔️
176+
needs:
177+
- lint-yaml
178+
- lint-json
179+
- qa
180+
- unittests-directly-on-os
181+
runs-on: ubuntu-latest
182+
steps:
183+
- run: echo "✔️"

0 commit comments

Comments
 (0)