Skip to content

Commit 13d1a64

Browse files
committed
Next gen QA set up:
* Update to latest QA tooling * Centralize GHA workflows * Replace Dependabot with Renovate * Bump to PHP8.2+
1 parent 3fdbf73 commit 13d1a64

14 files changed

+6816
-5759
lines changed

.gitattributes

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
# Ignoring files for distribution archieves
2-
examples/ export-ignore
2+
.idea/
3+
.github/ export-ignore
4+
etc/ export-ignore
35
tests/ export-ignore
4-
.travis.yml export-ignore
5-
.gitignore export-ignore
6+
var/ export-ignore
7+
.devcontainer.json export-ignore
8+
.editorconfig export-ignore
69
.gitattributes export-ignore
7-
.scrutinizer.yml export-ignore
8-
phpunit.xml.dist export-ignore
10+
.gitignore export-ignore
11+
CONTRIBUTING.md export-ignore
12+
infection.json.dist export-ignore
13+
Makefile export-ignore
14+
README.md export-ignore

.github/dependabot.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/renovate.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"github>WyriHaximus/renovate-config:php-package"
5+
]
6+
}

.github/workflows/ci.yml

Lines changed: 10 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -6,113 +6,14 @@ on:
66
- 'master'
77
- 'refs/heads/v[0-9]+.[0-9]+.[0-9]+'
88
pull_request:
9+
## This workflow needs the `pull-request` permissions to work for the package diffing
10+
## Refs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions
11+
permissions:
12+
pull-requests: write
13+
contents: read
914
jobs:
10-
supported-versions-matrix:
11-
name: Supported Versions Matrix
12-
runs-on: ubuntu-latest
13-
outputs:
14-
version: ${{ steps.supported-versions-matrix.outputs.version }}
15-
steps:
16-
- uses: actions/checkout@v1
17-
- id: supported-versions-matrix
18-
uses: WyriHaximus/github-action-composer-php-versions-in-range@v1
19-
supported-checks-matrix:
20-
name: Supported Checks Matrix
21-
runs-on: ubuntu-latest
22-
needs:
23-
- composer-install
24-
outputs:
25-
check: ${{ steps.supported-checks-matrix.outputs.check }}
26-
steps:
27-
- uses: actions/checkout@v1
28-
- id: supported-checks-matrix
29-
name: Generate check
30-
run: |
31-
printf "Checks found: %s\r\n" $(make task-list-ci)
32-
printf "::set-output name=check::%s" $(make task-list-ci)
33-
composer-install:
34-
strategy:
35-
fail-fast: false
36-
matrix:
37-
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
38-
composer: [lowest, current, highest]
39-
needs:
40-
- supported-versions-matrix
41-
runs-on: ubuntu-latest
42-
container:
43-
image: ghcr.io/wyrihaximusnet/php:${{ matrix.php }}-nts-buster-dev-root
44-
steps:
45-
- uses: actions/checkout@v1
46-
- name: Cache composer packages
47-
uses: actions/cache@v1
48-
with:
49-
path: ./vendor/
50-
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
51-
- name: Install Dependencies
52-
run: composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o
53-
if: matrix.composer == 'lowest'
54-
- name: Install Dependencies
55-
run: composer install --ansi --no-progress --no-interaction --prefer-dist -o
56-
if: matrix.composer == 'current'
57-
- name: Install Dependencies
58-
run: composer update --ansi --no-progress --no-interaction --prefer-dist -o
59-
if: matrix.composer == 'highest'
60-
qa:
61-
services:
62-
postgres:
63-
image: postgres:${{ matrix.postgres }}
64-
env:
65-
POSTGRES_PASSWORD: postgres
66-
# Set health checks to wait until postgres has started
67-
options: >-
68-
--health-cmd pg_isready
69-
--health-interval 10s
70-
--health-timeout 5s
71-
--health-retries 5
72-
name: Run ${{ matrix.check }} on PHP ${{ matrix.php }} with ${{ matrix.composer }} dependency preference against Postgres ${{ matrix.postgres }}
73-
strategy:
74-
fail-fast: false
75-
matrix:
76-
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
77-
postgres: [12, 13]
78-
composer: [lowest, current, highest]
79-
check: ${{ fromJson(needs.supported-checks-matrix.outputs.check) }}
80-
needs:
81-
- composer-install
82-
- supported-checks-matrix
83-
- supported-versions-matrix
84-
runs-on: ubuntu-latest
85-
container:
86-
image: ghcr.io/wyrihaximusnet/php:${{ matrix.php }}-nts-buster-dev-root
87-
steps:
88-
- uses: actions/checkout@v1
89-
- name: Cache composer packages
90-
uses: actions/cache@v1
91-
with:
92-
path: ./vendor/
93-
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
94-
- name: Install Dependencies
95-
run: (test -f vendor && true ) || composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o
96-
if: matrix.composer == 'lowest'
97-
- name: Install Dependencies
98-
run: (test -f vendor && true ) || composer install --ansi --no-progress --no-interaction --prefer-dist -o
99-
if: matrix.composer == 'current'
100-
- name: Install Dependencies
101-
run: (test -f vendor && true ) || composer update --ansi --no-progress --no-interaction --prefer-dist -o
102-
if: matrix.composer == 'highest'
103-
- name: Fetch Tags
104-
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true
105-
if: matrix.check == 'backward-compatibility-check'
106-
- run: mv .env.github-actions .env
107-
- run: export $(cat .env | tr -d '\r' | xargs) && make install_db
108-
- run: export $(cat .env | tr -d '\r' | xargs) && make ${{ matrix.check }}
109-
env:
110-
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
111-
COVERALLS_RUN_LOCALLY: ${{ secrets.COVERALLS_RUN_LOCALLY }}
112-
check-mark:
113-
name: ✔️
114-
needs:
115-
- qa
116-
runs-on: ubuntu-latest
117-
steps:
118-
- run: echo "✔️"
15+
ci:
16+
name: Continuous Integration
17+
uses: WyriHaximus/github-workflows/.github/workflows/package.yaml@main
18+
with:
19+
services: "{\"postgres\":{\"image\":\"postgres:\$\{\{ matrix.postgres \}\}\",\"env\":{\"POSTGRES_PASSWORD\":\"postgres\"},\"options\":\"--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5\"}}"

.github/workflows/craft-release.yaml

Lines changed: 0 additions & 76 deletions
This file was deleted.

.github/workflows/markdown-check-links.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release Management
2+
on:
3+
pull_request:
4+
types:
5+
- opened
6+
- labeled
7+
- unlabeled
8+
- synchronize
9+
- reopened
10+
milestone:
11+
types:
12+
- closed
13+
permissions:
14+
contents: write
15+
issues: write
16+
pull-requests: write
17+
jobs:
18+
release-managment:
19+
name: Create Release
20+
uses: WyriHaximus/github-workflows/.github/workflows/package-release-managment.yaml@main
21+
with:
22+
milestone: ${{ github.event.milestone.title }}
23+
description: ${{ github.event.milestone.title }}

.github/workflows/set-milestone-on-pr.yaml

Lines changed: 0 additions & 87 deletions
This file was deleted.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
.idea/
2+
var/
13
vendor/
2-
.env
4+
etc/qa/.phpunit.result.cache

0 commit comments

Comments
 (0)