Skip to content

Commit

Permalink
Merge pull request #127 from WyriHaximus/next-gen-qa-setup
Browse files Browse the repository at this point in the history
Next gen QA set up:
  • Loading branch information
WyriHaximus authored Mar 18, 2024
2 parents 3fdbf73 + 13d1a64 commit 34f2c60
Show file tree
Hide file tree
Showing 14 changed files with 6,816 additions and 5,759 deletions.
16 changes: 11 additions & 5 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Ignoring files for distribution archieves
examples/ export-ignore
.idea/
.github/ export-ignore
etc/ export-ignore
tests/ export-ignore
.travis.yml export-ignore
.gitignore export-ignore
var/ export-ignore
.devcontainer.json export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.scrutinizer.yml export-ignore
phpunit.xml.dist export-ignore
.gitignore export-ignore
CONTRIBUTING.md export-ignore
infection.json.dist export-ignore
Makefile export-ignore
README.md export-ignore
11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>WyriHaximus/renovate-config:php-package"
]
}
119 changes: 10 additions & 109 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,113 +6,14 @@ on:
- 'master'
- 'refs/heads/v[0-9]+.[0-9]+.[0-9]+'
pull_request:
## This workflow needs the `pull-request` permissions to work for the package diffing
## Refs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions
permissions:
pull-requests: write
contents: read
jobs:
supported-versions-matrix:
name: Supported Versions Matrix
runs-on: ubuntu-latest
outputs:
version: ${{ steps.supported-versions-matrix.outputs.version }}
steps:
- uses: actions/checkout@v1
- id: supported-versions-matrix
uses: WyriHaximus/github-action-composer-php-versions-in-range@v1
supported-checks-matrix:
name: Supported Checks Matrix
runs-on: ubuntu-latest
needs:
- composer-install
outputs:
check: ${{ steps.supported-checks-matrix.outputs.check }}
steps:
- uses: actions/checkout@v1
- id: supported-checks-matrix
name: Generate check
run: |
printf "Checks found: %s\r\n" $(make task-list-ci)
printf "::set-output name=check::%s" $(make task-list-ci)
composer-install:
strategy:
fail-fast: false
matrix:
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
composer: [lowest, current, highest]
needs:
- supported-versions-matrix
runs-on: ubuntu-latest
container:
image: ghcr.io/wyrihaximusnet/php:${{ matrix.php }}-nts-buster-dev-root
steps:
- uses: actions/checkout@v1
- name: Cache composer packages
uses: actions/cache@v1
with:
path: ./vendor/
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
- name: Install Dependencies
run: composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o
if: matrix.composer == 'lowest'
- name: Install Dependencies
run: composer install --ansi --no-progress --no-interaction --prefer-dist -o
if: matrix.composer == 'current'
- name: Install Dependencies
run: composer update --ansi --no-progress --no-interaction --prefer-dist -o
if: matrix.composer == 'highest'
qa:
services:
postgres:
image: postgres:${{ matrix.postgres }}
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
name: Run ${{ matrix.check }} on PHP ${{ matrix.php }} with ${{ matrix.composer }} dependency preference against Postgres ${{ matrix.postgres }}
strategy:
fail-fast: false
matrix:
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
postgres: [12, 13]
composer: [lowest, current, highest]
check: ${{ fromJson(needs.supported-checks-matrix.outputs.check) }}
needs:
- composer-install
- supported-checks-matrix
- supported-versions-matrix
runs-on: ubuntu-latest
container:
image: ghcr.io/wyrihaximusnet/php:${{ matrix.php }}-nts-buster-dev-root
steps:
- uses: actions/checkout@v1
- name: Cache composer packages
uses: actions/cache@v1
with:
path: ./vendor/
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
- name: Install Dependencies
run: (test -f vendor && true ) || composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o
if: matrix.composer == 'lowest'
- name: Install Dependencies
run: (test -f vendor && true ) || composer install --ansi --no-progress --no-interaction --prefer-dist -o
if: matrix.composer == 'current'
- name: Install Dependencies
run: (test -f vendor && true ) || composer update --ansi --no-progress --no-interaction --prefer-dist -o
if: matrix.composer == 'highest'
- name: Fetch Tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true
if: matrix.check == 'backward-compatibility-check'
- run: mv .env.github-actions .env
- run: export $(cat .env | tr -d '\r' | xargs) && make install_db
- run: export $(cat .env | tr -d '\r' | xargs) && make ${{ matrix.check }}
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_RUN_LOCALLY: ${{ secrets.COVERALLS_RUN_LOCALLY }}
check-mark:
name: ✔️
needs:
- qa
runs-on: ubuntu-latest
steps:
- run: echo "✔️"
ci:
name: Continuous Integration
uses: WyriHaximus/github-workflows/.github/workflows/package.yaml@main
with:
services: "{\"postgres\":{\"image\":\"postgres:\$\{\{ matrix.postgres \}\}\",\"env\":{\"POSTGRES_PASSWORD\":\"postgres\"},\"options\":\"--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5\"}}"
76 changes: 0 additions & 76 deletions .github/workflows/craft-release.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions .github/workflows/markdown-check-links.yaml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/release-managment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release Management
on:
pull_request:
types:
- opened
- labeled
- unlabeled
- synchronize
- reopened
milestone:
types:
- closed
permissions:
contents: write
issues: write
pull-requests: write
jobs:
release-managment:
name: Create Release
uses: WyriHaximus/github-workflows/.github/workflows/package-release-managment.yaml@main
with:
milestone: ${{ github.event.milestone.title }}
description: ${{ github.event.milestone.title }}
87 changes: 0 additions & 87 deletions .github/workflows/set-milestone-on-pr.yaml

This file was deleted.

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.idea/
var/
vendor/
.env
etc/qa/.phpunit.result.cache
Loading

0 comments on commit 34f2c60

Please sign in to comment.