Skip to content

Commit

Permalink
feat(init): This is where it all begins...
Browse files Browse the repository at this point in the history
chore(readme): Add badges
  • Loading branch information
Kacper Pruszynski committed Mar 10, 2024
0 parents commit f249027
Show file tree
Hide file tree
Showing 38 changed files with 12,234 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Coverage

on:
push:
branches:
- master

jobs:
coverage:
name: "Generate code coverage"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
- name: Build package
run: composer install --no-interaction --no-progress
- name: PHPUnit
run: ./vendor/bin/phpunit tests --coverage-clover clover.xml
- name: Generate Badge
uses: timkrase/[email protected]
with:
coverage_badge_path: output/coverage.svg
push_badge: false

- name: Push Badge
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./output
publish_branch: image-data
github_token: ${{ secrets.GITHUB_TOKEN }}
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
39 changes: 39 additions & 0 deletions .github/workflows/quality_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Quality Check

on:
pull_request:
branches:
- '**'
push:
branches:
- master

jobs:
checks:
name: "Pass code along quality checks"
strategy:
matrix:
version:
- '8.1'
- '8.2'
- '8.3'
os:
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.version }}
extensions: fileinfo
- name: Build package
run: composer install --no-interaction --no-progress
- name: Code Style Linter
run: ./vendor/bin/phpcs --standard=phpcs.xml --colors -sp
- name: PHPStan
run: ./vendor/bin/phpstan analyse --no-progress --configuration=phpstan.neon
- name: PHPUnit
run: ./vendor/bin/phpunit tests
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release

on:
workflow_run:
workflows: ["Quality Check"]
types: [completed]
branches:
- 'master'


jobs:
release:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
permissions:
contents: write
name: "Release new package version"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Publish Tag
id: semantic
uses: cycjimmy/semantic-release-action@v4
with:
extra_plugins: |
@semantic-release/commit-analyzer
@semantic-release/release-notes-generator
@semantic-release/changelog
@semantic-release/git
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Publish release
if: steps.semantic.outputs.new_release_published == 'true'
uses: ncipollo/release-action@v1
with:
name: ${{ steps.semantic.outputs.new_release_version }}
body: ${{ steps.semantic.outputs.new_release_notes }}
tag: ${{ steps.semantic.outputs.new_release_git_tag }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.DS_Store
vendor
.phpcs.cache
.phpunit.cache
clover.xml
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

118 changes: 118 additions & 0 deletions .idea/blade.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/codeception.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions .idea/git_toolbox_prj.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f249027

Please sign in to comment.