Skip to content

Commit

Permalink
Add New files
Browse files Browse the repository at this point in the history
  • Loading branch information
prathmeshyelne committed May 11, 2024
1 parent 4aece28 commit 7964947
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/formats.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Formats

on: ['push', 'pull_request']

jobs:
ci:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.1]
dependency-version: [prefer-lowest, prefer-stable]

name: Formats P${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}

steps:

- name: Checkout
uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, mbstring, zip
tools: prestissimo
coverage: pcov

- name: Install Composer dependencies
run: composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist

- name: Coding Style Checks
run: composer test:lint

- name: Refacto Checks
run: composer test:refacto

- name: Type Checks
run: composer test:types

- name: Type Coverage
run: composer test:type-coverage min=100
39 changes: 39 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Tests

on: ['push', 'pull_request']

jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.1, 8.2, 8.3]
dependency-version: [prefer-lowest, prefer-stable]

name: Tests P${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}

steps:

- name: Checkout
uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, mbstring, zip
coverage: none

- name: Install Composer dependencies
run: composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist

- name: Unit Tests
run: composer test:unit

0 comments on commit 7964947

Please sign in to comment.