Skip to content

Commit

Permalink
Format YAML
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Apr 28, 2022
1 parent abcfc92 commit e6da9ad
Show file tree
Hide file tree
Showing 5 changed files with 140 additions and 144 deletions.
58 changes: 28 additions & 30 deletions .github/workflows/code-reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,38 @@ name: Create Code Reports

on:
push:
branches: [ master ]
branches: [master]

workflow_dispatch:

jobs:
create-coverage-report:
runs-on: ubuntu-latest

steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.0'
coverage: xdebug
extensions: fileinfo
- name: Install Hyde
run: git clone https://github.com/hydephp/hyde.git $(pwd)
- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Set Framework version to dev-master
run: composer require hyde/framework:dev-master
- name: Set environment to testing
run: echo "ENV=testing" > .env
- name: Run tests with HTML coverage reporting
run: vendor/bin/pest --coverage-html covrep
env:
ENV: testing

- name: Upload the report as an artifact
uses: actions/upload-artifact@v1
with:
name: 'coverage-report'
path: 'covrep'

- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: "8.0"
coverage: xdebug
extensions: fileinfo
- name: Install Hyde
run: git clone https://github.com/hydephp/hyde.git $(pwd)
- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Set Framework version to dev-master
run: composer require hyde/framework:dev-master
- name: Set environment to testing
run: echo "ENV=testing" > .env
- name: Run tests with HTML coverage reporting
run: vendor/bin/pest --coverage-html covrep
env:
ENV: testing

- name: Upload the report as an artifact
uses: actions/upload-artifact@v1
with:
name: "coverage-report"
path: "covrep"

build-php-docs:
runs-on: ubuntu-latest
Expand All @@ -53,10 +52,9 @@ jobs:
- name: Upload the documentation as an artifact
uses: actions/upload-artifact@v1
with:
name: 'api-docs'
path: 'api-docs'


name: "api-docs"
path: "api-docs"

upload-html-files:
needs: [create-coverage-report, build-php-docs]
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency Review'
name: "Dependency Review"
on: [pull_request]

permissions:
Expand All @@ -14,7 +14,7 @@ jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
- name: "Checkout Repository"
uses: actions/checkout@v3
- name: 'Dependency Review'
- name: "Dependency Review"
uses: actions/dependency-review-action@v1
147 changes: 73 additions & 74 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
name: Test Suite (Matrix)
on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

jobs:
# First run tests with coverage. If this fails, we don't need to run the matrix.
test-coverage:
runs-on: ubuntu-latest

steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.0'
coverage: xdebug
extensions: fileinfo
- name: Install Hyde
run: git clone https://github.com/hydephp/hyde.git $(pwd)
- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Set Framework version to dev-github.ref_name
run: 'composer require hyde/framework:dev-${{ github.ref_name }}'
- name: Set environment to testing
run: echo "ENV=testing" > .env
- name: Output debug information
run: php hyde debug
- name: Run tests with output coverage reporting
run: vendor/bin/pest --coverage
env:
ENV: testing
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: "8.0"
coverage: xdebug
extensions: fileinfo
- name: Install Hyde
run: git clone https://github.com/hydephp/hyde.git $(pwd)
- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Set Framework version to dev-github.ref_name
run: "composer require hyde/framework:dev-${{ github.ref_name }}"
- name: Set environment to testing
run: echo "ENV=testing" > .env
- name: Output debug information
run: php hyde debug
- name: Run tests with output coverage reporting
run: vendor/bin/pest --coverage
env:
ENV: testing

- name: Run tests and save coverage to file
run: vendor/bin/pest --coverage-text=report.txt
env:
ENV: testing
- name: Run tests and save coverage to file
run: vendor/bin/pest --coverage-text=report.txt
env:
ENV: testing

- name: Upload the report as an artifact
uses: actions/upload-artifact@v1
with:
name: 'report.txt'
path: 'report.txt'
- name: Upload the report as an artifact
uses: actions/upload-artifact@v1
with:
name: "report.txt"
path: "report.txt"

hyde-tests:
needs: test-coverage
Expand All @@ -51,56 +51,55 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.0'
extensions: fileinfo
- name: Install Hyde
run: git clone https://github.com/hydephp/hyde.git $(pwd)
- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Set Framework version to dev-github.ref_name
run: 'composer require hyde/framework:dev-${{ github.ref_name }}'
- name: Set environment to testing
run: echo "ENV=testing" > .env
- name: Execute tests (Unit and Feature tests) via PHPUnit/Pest
run: vendor/bin/pest
env:
ENV: testing
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: "8.0"
extensions: fileinfo
- name: Install Hyde
run: git clone https://github.com/hydephp/hyde.git $(pwd)
- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Set Framework version to dev-github.ref_name
run: "composer require hyde/framework:dev-${{ github.ref_name }}"
- name: Set environment to testing
run: echo "ENV=testing" > .env
- name: Execute tests (Unit and Feature tests) via PHPUnit/Pest
run: vendor/bin/pest
env:
ENV: testing

update-coverage-badge:
runs-on: ubuntu-latest
needs: test-coverage
if: github.event_name == 'push'

steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.0'
extensions: fileinfo

- name: Download report
uses: actions/download-artifact@v3
with:
name: report.txt
path: report.txt
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: "8.0"
extensions: fileinfo

- name: Download Coverage Parser
run: 'wget https://gist.githubusercontent.com/caendesilva/75a5ff8dd4e23921b75f503149655924/raw/456bd4bae423eda2a3ff2ba2ce8f8246f366d46f/parser.php'
- name: Run the parser
id: run-coverage-parser
run: echo ::set-output name=average_coverage::$(php parser.php)
- name: Output the value
run: echo Result ${{ steps.run-coverage-parser.outputs.average_coverage }}
- name: Post the result to server
run: 'curl -X POST https://cdn.desilva.se/microservices/coverbadges/api.php -H "Content-Type: application/x-www-form-urlencoded" -d "repo=https://github.com/hydephp/hyde&value=${{ steps.run-coverage-parser.outputs.average_coverage }}&token=${{ secrets.COVERBADGES_SECRET }}"'
- name: Download report
uses: actions/download-artifact@v3
with:
name: report.txt
path: report.txt

- name: Download the SVG badge
run: 'wget https://cdn.desilva.se/microservices/coverbadges/badges/9b8f6a9a7a48a2df54e6751790bad8bd910015301e379f334d6ec74c4c3806d1.svg'

- name: Upload the SVG badge as an artifact
uses: actions/upload-artifact@v1
with:
name: 'badge.svg'
path: '9b8f6a9a7a48a2df54e6751790bad8bd910015301e379f334d6ec74c4c3806d1.svg'

- name: Download Coverage Parser
run: "wget https://gist.githubusercontent.com/caendesilva/75a5ff8dd4e23921b75f503149655924/raw/456bd4bae423eda2a3ff2ba2ce8f8246f366d46f/parser.php"
- name: Run the parser
id: run-coverage-parser
run: echo ::set-output name=average_coverage::$(php parser.php)
- name: Output the value
run: echo Result ${{ steps.run-coverage-parser.outputs.average_coverage }}
- name: Post the result to server
run: 'curl -X POST https://cdn.desilva.se/microservices/coverbadges/api.php -H "Content-Type: application/x-www-form-urlencoded" -d "repo=https://github.com/hydephp/hyde&value=${{ steps.run-coverage-parser.outputs.average_coverage }}&token=${{ secrets.COVERBADGES_SECRET }}"'

- name: Download the SVG badge
run: "wget https://cdn.desilva.se/microservices/coverbadges/badges/9b8f6a9a7a48a2df54e6751790bad8bd910015301e379f334d6ec74c4c3806d1.svg"

- name: Upload the SVG badge as an artifact
uses: actions/upload-artifact@v1
with:
name: "badge.svg"
path: "9b8f6a9a7a48a2df54e6751790bad8bd910015301e379f334d6ec74c4c3806d1.svg"
42 changes: 21 additions & 21 deletions .github/workflows/update-filecache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Update Filecache

on:
push:
branches: [ master ]
branches: [master]

workflow_dispatch:

Expand All @@ -15,23 +15,23 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Compile the checksums and save the filecache
run: cd resources/data && php filecacheGenerator.php

- name: Check if any changes were made
uses: tj-actions/verify-changed-files@v9
id: verify-changed-files
with:
files: resources/data/filecache.json

- name: Create Pull Request with the new filecache
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: peter-evans/create-pull-request@v4
with:
commit-message: Automatic Filecache Update
title: Update Filecache
body: Updated the filecache.json with new resource file checksums.
branch: update-checksums
base: master
- uses: actions/checkout@v3

- name: Compile the checksums and save the filecache
run: cd resources/data && php filecacheGenerator.php

- name: Check if any changes were made
uses: tj-actions/verify-changed-files@v9
id: verify-changed-files
with:
files: resources/data/filecache.json

- name: Create Pull Request with the new filecache
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: peter-evans/create-pull-request@v4
with:
commit-message: Automatic Filecache Update
title: Update Filecache
body: Updated the filecache.json with new resource file checksums.
branch: update-checksums
base: master
31 changes: 15 additions & 16 deletions .github/workflows/update-hydefront.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Update Hydefront

on:
push:
branches: [ master ]
branches: [master]

workflow_dispatch:

Expand All @@ -14,19 +14,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Create pull request
uses: paygoc6/[email protected]
env:
API_TOKEN_GITHUB: ${{ secrets.PAT }}
with:
source_folder: 'resources/assets/.'
destination_folder: '/'
destination_repo: 'hydephp/hydefront'
destination_base_branch: 'master'
destination_head_branch: 'framework-merge'
user_email: '[email protected]'
user_name: 'hydephp'
pull_request_reviewers: 'reviewers'
- uses: actions/checkout@v3

- name: Create pull request
uses: paygoc6/[email protected]
env:
API_TOKEN_GITHUB: ${{ secrets.PAT }}
with:
source_folder: "resources/assets/."
destination_folder: "/"
destination_repo: "hydephp/hydefront"
destination_base_branch: "master"
destination_head_branch: "framework-merge"
user_email: "[email protected]"
user_name: "hydephp"
pull_request_reviewers: "reviewers"

0 comments on commit e6da9ad

Please sign in to comment.