Skip to content

Commit

Permalink
Clean up folder structure
Browse files Browse the repository at this point in the history
  • Loading branch information
curry684 committed Dec 1, 2023
1 parent 39e985c commit bc0aa37
Show file tree
Hide file tree
Showing 8 changed files with 120 additions and 3 deletions.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# These are supported funding model platforms

github: curry684

# patreon: # Replace with a single Patreon username
# open_collective: # Replace with a single Open Collective username
# ko_fi: # Replace with a single Ko-fi username
# tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
# liberapay: # Replace with a single Liberapay username
# issuehunt: # Replace with a single IssueHunt username
# otechie: # Replace with a single Otechie username
# lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
# custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
7 changes: 7 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Reporting Security Issues

To report a security issue, please use the GitHub Security Advisory ["Report a Vulnerability"](https://github.com/omines/datatables-bundle/security/advisories/new) tab.

The team will send a response indicating the next steps in handling your report. After the initial reply to your report, the security team will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance.

Report security bugs in third-party modules to the person or team maintaining the module.
File renamed without changes.
95 changes: 95 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: test suite

on:
pull_request_target:
push:
branches:
- master
schedule: # Ensure weekly test also if no pushes happen to keep up with dependencies
- cron: 0 11 * * 1

jobs:
run:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental || matrix.dependencies == 'beta' }}
strategy:
fail-fast: false
matrix:
php:
- '8.1'
- '8.2'
- '8.3'
dependencies: [ stable, beta, lowest ]
experimental: [ false ]
include:
- description: 'stable dependencies'
dependencies: stable
- description: 'lowest dependencies'
dependencies: lowest
- description: 'beta/RC dependencies'
dependencies: beta
# - description: 'nightly with stable dependencies'
# php: 8.4
# experimental: true

name: PHP ${{ matrix.php }} ${{ matrix.description }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: intl, mbstring
ini-values: zend.assertions=1

- name: Dump PHP diagnostics
run: php -i && php -m

- name: Allow beta dependencies
run: composer config minimum-stability beta
if: matrix.dependencies == 'beta'

- name: Install dependencies
run: composer update --no-progress ${{ (matrix.dependencies == 'lowest') && '--prefer-lowest --prefer-stable' || ''}}

- name: Check for dangerous and broken dependencies
run: composer audit
if: ${{ matrix.dependencies == 'stable' && !matrix.experimental }}

- name: Check code style
run: vendor/bin/php-cs-fixer fix --dry-run
if: ${{ matrix.dependencies == 'stable' && !matrix.experimental }}

- name: Run PHPStan static analysis
run: vendor/bin/phpstan
if: ${{ matrix.dependencies != 'lowest' && !matrix.experimental }}

- name: Run automated tests
run: vendor/bin/phpunit --coverage-text --coverage-xml build/coverage-xml --coverage-cobertura build/cobertura.xml

- name: Code Coverage Report
uses: irongut/[email protected]
with:
filename: build/cobertura.xml
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: '90 98'

- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ simply don't have a lot of time to spare, so your questions will be answered fas

## Contributing

Please see [CONTRIBUTING.md](https://github.com/omines/datatables-bundle/blob/master/CONTRIBUTING.md) for details.
Please see [CONTRIBUTING.md](https://github.com/omines/datatables-bundle/blob/master/.github/CONTRIBUTING.md) for details.

## Legal

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,16 @@
"doctrine/doctrine-bundle": "^2.7|^3.0",
"doctrine/orm": "^2.13.1",
"doctrine/persistence": "^2.0|^3.0.3",
"friendsofphp/php-cs-fixer": "^3.9.5",
"friendsofphp/php-cs-fixer": "^v3.40.0",
"mongodb/mongodb": "^1.12",
"ocramius/package-versions": "^2.5",
"ocramius/package-versions": "^2.8",
"phpoffice/phpspreadsheet": "^1.24.1",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.8.2",
"phpstan/phpstan-doctrine": "^1.3.12",
"phpstan/phpstan-phpunit": "^1.1",
"phpstan/phpstan-symfony": "^1.2.9",
"phpunit/phpunit": "^10.5",
"ruflin/elastica": "^6.0|^7.2",
"symfony/browser-kit": "^6.1.3|^7.0",
"symfony/css-selector": "^6.1.3|^7.0",
Expand Down

0 comments on commit bc0aa37

Please sign in to comment.