From c0bb979750845c556f1f722a4fd2e4a45efdff68 Mon Sep 17 00:00:00 2001 From: Toon Verwerft Date: Mon, 6 Jan 2025 18:05:48 +0100 Subject: [PATCH] Add github workflows --- .github/FUNDING.yml | 1 + .github/ISSUE_TEMPLATE/Bug.md | 34 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/Feature_Request.md | 18 ++++++++++++ .github/ISSUE_TEMPLATE/Support_Question.md | 15 ++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 11 +++++++ .github/dependabot.yml | 8 +++++ .github/workflows/analyzers.yaml | 26 +++++++++++++++++ .github/workflows/code-style.yaml | 26 +++++++++++++++++ .github/workflows/tests.yaml | 27 +++++++++++++++++ 9 files changed, 166 insertions(+) create mode 100644 .github/FUNDING.yml create mode 100644 .github/ISSUE_TEMPLATE/Bug.md create mode 100644 .github/ISSUE_TEMPLATE/Feature_Request.md create mode 100644 .github/ISSUE_TEMPLATE/Support_Question.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/analyzers.yaml create mode 100644 .github/workflows/code-style.yaml create mode 100644 .github/workflows/tests.yaml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..eff9242 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +open_collective: php-soap diff --git a/.github/ISSUE_TEMPLATE/Bug.md b/.github/ISSUE_TEMPLATE/Bug.md new file mode 100644 index 0000000..2e7d29c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Bug.md @@ -0,0 +1,34 @@ +--- +name: 🐞 Bug Report +about: Something is broken? 🔨 +--- + +### Bug Report + + + +| Q | A +|------------ | ------ +| BC Break | yes/no +| Version | x.y.z + +#### Summary + + + +#### Current behaviour + + + +#### How to reproduce + + + +#### Expected behaviour + + + diff --git a/.github/ISSUE_TEMPLATE/Feature_Request.md b/.github/ISSUE_TEMPLATE/Feature_Request.md new file mode 100644 index 0000000..2620581 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Feature_Request.md @@ -0,0 +1,18 @@ +--- +name: 🎉 Feature Request +about: You have a neat idea that should be implemented? 🎩 +--- + +### Feature Request + + + +| Q | A +|------------ | ------ +| New Feature | yes +| RFC | yes/no +| BC Break | yes/no + +#### Summary + + diff --git a/.github/ISSUE_TEMPLATE/Support_Question.md b/.github/ISSUE_TEMPLATE/Support_Question.md new file mode 100644 index 0000000..813fb01 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Support_Question.md @@ -0,0 +1,15 @@ +--- +name: ❓ Support Question +about: Have a problem that you can't figure out? 🤔 +--- + + + +| Q | A +|------------ | ----- +| Version | x.y.z + + +### Support Question + + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..d88b155 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,11 @@ + + +| Q | A +|------------- | ----------- +| Type | bug/feature/improvement +| BC Break | yes/no +| Fixed issues | + +#### Summary + + diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..5a98fda --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: +- package-ecosystem: composer + directory: "/" + schedule: + interval: daily + time: "04:00" + open-pull-requests-limit: 10 diff --git a/.github/workflows/analyzers.yaml b/.github/workflows/analyzers.yaml new file mode 100644 index 0000000..50d7f5a --- /dev/null +++ b/.github/workflows/analyzers.yaml @@ -0,0 +1,26 @@ +name: Analyzers + +on: [push, pull_request] +jobs: + run: + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: [ubuntu-latest] + php-versions: [ '8.2', '8.3' ] + composer-options: [ '--ignore-platform-req=php+' ] + fail-fast: false + name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }} + steps: + - name: Checkout + uses: actions/checkout@master + - name: Install PHP + uses: shivammathur/setup-php@master + with: + php-version: ${{ matrix.php-versions }} + tools: 'composer:v2' + extensions: pcov, mbstring, posix, dom, soap + - name: Install dependencies + run: composer update --prefer-dist --no-progress --no-suggest ${{ matrix.composer-options }} + - name: Run the tests + run: ./vendor/bin/psalm diff --git a/.github/workflows/code-style.yaml b/.github/workflows/code-style.yaml new file mode 100644 index 0000000..65e0c34 --- /dev/null +++ b/.github/workflows/code-style.yaml @@ -0,0 +1,26 @@ +name: CodeStyle + +on: [push, pull_request] +jobs: + run: + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: [ubuntu-latest] + php-versions: [ '8.2', '8.3', '8.4' ] + composer-options: [ '--ignore-platform-req=php+' ] + fail-fast: false + name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }} + steps: + - name: Checkout + uses: actions/checkout@master + - name: Install PHP + uses: shivammathur/setup-php@master + with: + php-version: ${{ matrix.php-versions }} + tools: 'composer:v2' + extensions: pcov, mbstring, posix, dom, soap + - name: Install dependencies + run: composer update --prefer-dist --no-progress --no-suggest ${{ matrix.composer-options }} + - name: Run the tests + run: PHP_CS_FIXER_IGNORE_ENV=1 ./tools/php-cs-fixer.phar fix --dry-run --diff diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..f819719 --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,27 @@ +name: Tests + +on: [push, pull_request] +jobs: + run: + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: [ubuntu-latest] + php-versions: [ '8.2', '8.3', '8.4' ] + composer-options: [ '--ignore-platform-req=php+' ] + dependency-preference: ['current', 'lowest', 'stable'] + fail-fast: false + name: PHP ${{ matrix.php-versions }} ${{ matrix.dependency-preference }} deps @ ${{ matrix.operating-system }} + steps: + - name: Checkout + uses: actions/checkout@master + - name: Install PHP + uses: shivammathur/setup-php@master + with: + php-version: ${{ matrix.php-versions }} + tools: 'composer:v2' + extensions: pcov, mbstring, posix, dom, soap + - name: Install dependencies + run: composer update --prefer-dist --no-progress --no-suggest ${{ matrix.dependency-preference == 'lowest' && '--prefer-lowest' || '' }} ${{ matrix.dependency-preference == 'stable' && '--prefer-stable' || '' }} ${{ matrix.composer-options }} + - name: Run the tests + run: ./vendor/bin/phpunit