Skip to content

Commit 4cdbd71

Browse files
committed
Added workflows and badges
1 parent 15f5b34 commit 4cdbd71

3 files changed

Lines changed: 80 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Dependency Review Action
2+
#
3+
# This Action will scan dependency manifest files that change as part of a Pull Reqest, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
4+
#
5+
# Source repository: https://github.com/actions/dependency-review-action
6+
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
7+
#
8+
# Last revised: 2024/02/11
9+
#
10+
name: 'Dependency Review'
11+
on: [pull_request]
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
dependency-review:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: 'Checkout Repository'
21+
uses: actions/checkout@v4
22+
- name: 'Dependency Review'
23+
uses: actions/dependency-review-action@v4

.github/workflows/php.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# php.yml
2+
3+
# Stolen from osteel’s article:
4+
# A GitHub workflow to check the compatibility of your PHP package with a range of dependency versions
5+
# https://tech.osteel.me/posts/a-github-workflow-to-check-the-compatibility-of-your-php-package-with-a-range-of-dependency-versions
6+
7+
name: Tests
8+
9+
on:
10+
push:
11+
branches: [ main, develop ]
12+
pull_request:
13+
branches: [ main ]
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
phpunit:
20+
name: Tests
21+
runs-on: ubuntu-latest
22+
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
php-version:
27+
- "8.3"
28+
- "8.4"
29+
dependency-versions:
30+
- "lowest"
31+
- "highest"
32+
33+
steps:
34+
- name: Checkout Repository
35+
uses: actions/checkout@v4
36+
37+
- name: Setup PHP
38+
uses: shivammathur/setup-php@v2
39+
with:
40+
php-version: ${{ matrix.php-version }}
41+
coverage: none
42+
43+
- name: Install Composer dependencies
44+
uses: ramsey/composer-install@v2
45+
with:
46+
dependency-versions: ${{ matrix.dependency-versions }}
47+
48+
- name: Run PHPUnit
49+
run: vendor/bin/phpunit tests --no-coverage
50+
51+
- name: Run phpstan
52+
run: vendor/bin/phpstan analyse

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11

22
# tomkyle/binning
33

4+
[![Packagist](https://img.shields.io/packagist/v/tomkyle/binning.svg?style=flat)](https://packagist.org/packages/tomkyle/binning )
5+
[![PHP version](https://img.shields.io/packagist/php-v/tomkyle/binning.svg)](https://packagist.org/packages/tomkyle/binning )
6+
[![PHP Composer](https://github.com/tomkyle/binning/actions/workflows/php.yml/badge.svg)](https://github.com/tomkyle/binning/actions/workflows/php.yml)
7+
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE)
8+
49
**Determine the optimal 𝒌 number of bins for histogram creation and optimal bin width 𝒉 using various statistical methods. Its unified interface includes implementations of well-known binning rules such as:**
510

611
- Square Root Rule (1892)

0 commit comments

Comments
 (0)