Skip to content

Commit

Permalink
Merge pull request #40 from WyriHaximus/update-to-global-loop
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Nov 29, 2021
2 parents e3a6cd2 + c889f67 commit c3fde83
Show file tree
Hide file tree
Showing 23 changed files with 1,417 additions and 847 deletions.
6 changes: 6 additions & 0 deletions .editorconfig
Expand Up @@ -10,5 +10,11 @@ trim_trailing_whitespace = true
[*.json]
indent_size = 2

[*.yml]
indent_size = 2

[*.yaml]
indent_size = 2

[Makefile]
indent_style = tab
18 changes: 10 additions & 8 deletions .gitattributes
@@ -1,11 +1,13 @@
# Ignoring files for distribution archieves
examples/ export-ignore
.github/ export-ignore
etc/ export-ignore
tests/ export-ignore
.dunitconfig 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
.styleci.yml export-ignore
appveyor.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
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
@@ -1 +1 @@
github: WyriHaximus
github: WyriHaximus
3 changes: 3 additions & 0 deletions .github/boring-cyborg.yml
@@ -1,4 +1,7 @@
labelPRBasedOnFilePath:
"Documentation 📚":
- README.md
- CONTRIBUTING.md
"Dependencies 📦":
- Dockerfile*
- composer.*
Expand Down
108 changes: 93 additions & 15 deletions .github/workflows/ci.yml
Expand Up @@ -3,21 +3,58 @@ on:
push:
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Lint Code Base
uses: docker://github/super-linter:v2.2.0
package-name:
name: Package Name
runs-on: ubuntu-latest
needs:
- lint-json
outputs:
package-name: ${{ steps.package-name.outputs.package-name }}
steps:
- uses: actions/checkout@v1
- id: package-name
run: |
printf "::set-output name=package-name::[\"%s\"]" $(docker run --rm -v "`pwd`:`pwd`" jess/jq jq -r -c '.name' "${GITHUB_WORKSPACE}/composer.json")
supported-versions-matrix:
name: Supported Versions Matrix
runs-on: ubuntu-latest
needs:
- lint-yaml
- lint-json
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:
- lint-yaml
- 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: [7.4]
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
composer: [lowest, current, highest]
needs: lint
needs:
- lint-yaml
- lint-json
- supported-versions-matrix
runs-on: ubuntu-latest
container:
image: wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.11-dev-root
image: ghcr.io/wyrihaximusnet/php:${{ matrix.php }}-nts-alpine-dev-root
steps:
- uses: actions/checkout@v1
- name: Cache composer packages
Expand All @@ -38,13 +75,18 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.4]
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
composer: [lowest, current, highest]
qa: [lint, cs, stan, psalm, unit-ci, infection, composer-require-checker, composer-unused, backward-compatibility-check]
needs: composer-install
check: ${{ fromJson(needs.supported-checks-matrix.outputs.check) }}
needs:
- lint-yaml
- lint-json
- composer-install
- supported-checks-matrix
- supported-versions-matrix
runs-on: ubuntu-latest
container:
image: wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.11-dev-root
image: ghcr.io/wyrihaximusnet/php:${{ matrix.php }}-nts-alpine-dev-root
steps:
- uses: actions/checkout@v1
- name: Cache composer packages
Expand All @@ -62,6 +104,42 @@ jobs:
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/*
if: matrix.qa == 'backward-compatibility-check'
- run: make ${{ matrix.qa }}
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true
if: matrix.check == 'backward-compatibility-check'
- run: make ${{ matrix.check }}
env:
REDIS_DSN: redis://redis:6379/6
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_RUN_LOCALLY: ${{ secrets.COVERALLS_RUN_LOCALLY }}
lint-yaml:
name: Lint YAML
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: yaml-lint
uses: ibiqlik/action-yamllint@v3
with:
config_data: |
extends: default
rules:
line-length: disable
document-start: disable
truthy: disable
lint-json:
name: Lint JSON
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: json-syntax-check
uses: limitusus/json-syntax-check@v1
with:
pattern: "\\.json$"
check-mark:
name: ✔️
needs:
- lint-yaml
- lint-json
- qa
runs-on: ubuntu-latest
steps:
- run: echo "✔️"
20 changes: 0 additions & 20 deletions .github/workflows/craft-release.yaml
Expand Up @@ -6,28 +6,8 @@ on:
types:
- closed
jobs:
wait-for-status-checks:
name: Wait for status checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: sleep 13
- name: 'Wait for status checks'
id: waitforstatuschecks
uses: "WyriHaximus/github-action-wait-for-status@master"
with:
ignoreActions: "Wait for status checks"
checkInterval: 5
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- id: generate-version-strategy
if: steps.waitforstatuschecks.outputs.status != 'success'
name: Fail
run: exit 1
generate-changelog:
name: Generate Changelog
needs:
- wait-for-status-checks
runs-on: ubuntu-latest
outputs:
changelog: ${{ steps.changelog.outputs.changelog }}
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/label-sponsors.yml
@@ -1,18 +1,18 @@
name: Label sponsors ❤️
on:
pull_request:
types:
- opened
issues:
types:
- opened
pull_request:
types:
- opened
issues:
types:
- opened
jobs:
sponsor-label:
name: Label sponsors ❤️
runs-on: ubuntu-latest
steps:
- uses: JasonEtco/is-sponsor-label-action@v1
with:
label: Sponsor Request ❤️
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
sponsor-label:
name: Label sponsors ❤️
runs-on: ubuntu-latest
steps:
- uses: JasonEtco/is-sponsor-label-action@v1
with:
label: Sponsor Request ❤️
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 2 additions & 8 deletions .github/workflows/set-milestone-on-pr.yaml
Expand Up @@ -11,44 +11,39 @@ on:
- review_requested
jobs:
set-milestone:
if: github.event.pull_request.milestone == null
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
if: github.event.pull_request.milestone == null
- name: 'Get Previous tag'
if: github.event.pull_request.milestone == null
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@master"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: 'Get next minor version'
if: github.event.pull_request.milestone == null
id: semvers
uses: "WyriHaximus/github-action-next-semvers@master"
with:
version: ${{ steps.previoustag.outputs.tag }}
- name: 'Get Milestones'
if: github.event.pull_request.milestone == null
uses: "WyriHaximus/github-action-get-milestones@master"
id: milestones
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- run: printf "::set-output name=number::%s" $(printenv MILESTONES | jq --arg MILESTONE $(printenv MILESTONE) '.[] | select(.title == $MILESTONE) | .number')
if: github.event.pull_request.milestone == null
id: querymilestone
env:
MILESTONES: ${{ steps.milestones.outputs.milestones }}
MILESTONE: ${{ steps.semvers.outputs.minor }}
- name: 'Create Milestone'
if: github.event.pull_request.milestone == null && steps.querymilestone.outputs.number == ''
if: steps.querymilestone.outputs.number == ''
id: createmilestone
uses: "WyriHaximus/github-action-create-milestone@master"
with:
title: ${{ steps.semvers.outputs.minor }}
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: 'Select found or created Milestone'
if: github.event.pull_request.milestone == null
id: selectmilestone
run: |
if [ $(echo ${QUERY_NUMBER} | wc -c) -eq 1 ] ; then
Expand All @@ -61,7 +56,6 @@ jobs:
CREATED_NUMBER: ${{ steps.createmilestone.outputs.number }}
QUERY_NUMBER: ${{ steps.querymilestone.outputs.number }}
- name: 'Set Milestone'
if: github.event.pull_request.milestone == null
uses: "WyriHaximus/github-action-set-milestone@master"
with:
issue_number: ${{ github.event.pull_request.number }}
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
@@ -1,2 +1,4 @@
examples/credentials.php
etc/qa/.phpunit.result.cache
var/*
!var/.gitkeep
vendor/

0 comments on commit c3fde83

Please sign in to comment.