Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Mar 22, 2023
1 parent e425f16 commit 271313a
Show file tree
Hide file tree
Showing 34 changed files with 96,538 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .gitattributes
@@ -0,0 +1,13 @@
/.github export-ignore
/.phive export-ignore
/.psalm export-ignore
/tests export-ignore
/tools export-ignore
/tools/* binary
/.gitattributes export-ignore
/.gitignore export-ignore
/.php-cs-fixer.dist.php export-ignore
/build.xml export-ignore
/phpunit.xml export-ignore

*.php diff=php
1 change: 1 addition & 0 deletions .github/FUNDING.yml
@@ -0,0 +1 @@
github: sebastianbergmann
104 changes: 104 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,104 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

on:
- "pull_request"
- "push"

name: "CI"

permissions:
contents: read

jobs:
coding-guidelines:
name: Coding Guidelines

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none

- name: Run PHP-CS-Fixer
run: ./tools/php-cs-fixer fix --dry-run --show-progress=dots --using-cache=no --verbose

type-checker:
name: Type Checker

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none

- name: Install dependencies with Composer
run: ./tools/composer update --no-interaction --no-ansi --no-progress

- name: Run Psalm
run: ./tools/psalm --config=.psalm/config.xml --no-progress --shepherd --show-info=false --stats

tests:
name: Tests

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php-version:
- "8.2"
- "8.3"

steps:
- name: "Checkout"
uses: "actions/checkout@v3"

- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
coverage: "pcov"

- name: "Install dependencies with Composer"
run: "./tools/composer update --no-ansi --no-interaction --no-progress"

- name: "Run tests with PHPUnit"
run: "./tools/phpunit --coverage-clover=coverage.xml"

- name: "Send code coverage report to Codecov.io"
env:
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
run: "bash <(curl -s https://codecov.io/bash) || true"

mutation-tests:
name: Mutation Tests

runs-on: ubuntu-latest

steps:
- name: "Checkout"
uses: "actions/checkout@v3"

- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@v2"
with:
php-version: "8.2"
coverage: "pcov"

- name: "Install dependencies with Composer"
run: "./tools/composer update --no-ansi --no-interaction --no-progress"

- name: "Run mutation tests with Infection"
run: "./tools/infection"
6 changes: 6 additions & 0 deletions .gitignore
@@ -0,0 +1,6 @@
/.idea
/.php-cs-fixer.php
/.php-cs-fixer.cache
/.phpunit.cache
/composer.lock
/vendor
8 changes: 8 additions & 0 deletions .phive/phars.xml
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="composer" version="^2.5" installed="2.5.5" location="./tools/composer" copy="true"/>
<phar name="phpunit" version="^10.0" installed="10.0.18" location="./tools/phpunit" copy="true"/>
<phar name="php-cs-fixer" version="^3.15" installed="3.15.1" location="./tools/php-cs-fixer" copy="true"/>
<phar name="psalm" version="^5.8" installed="5.8.0" location="./tools/psalm" copy="true"/>
<phar name="infection" version="^0.26" installed="0.26.19" location="./tools/infection" copy="true"/>
</phive>

0 comments on commit 271313a

Please sign in to comment.