Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.coveralls.yml export-ignore
.gitattributes export-ignore
.github/ export-ignore
.gitignore export-ignore
.travis.yml export-ignore
composer.json export-ignore
phpunit.xml.dist export-ignore
tests export-ignore
40 changes: 40 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI
on:
- push
- pull_request

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:

php:
strategy:
matrix:
include:
# Has php7.2-8.1 and composer 2 pre-installed
# https://github.com/actions/virtual-environments/blob/ubuntu18/20220626.1/images/linux/Ubuntu1804-Readme.md#php
- os: ubuntu-18.04
php: "7.2"
- os: ubuntu-18.04
php: "7.3"
# Has php7.4-8.1 and composer 2 pre-installed
# https://github.com/actions/virtual-environments/blob/ubuntu20/20220626.1/images/linux/Ubuntu2004-Readme.md#php
- os: ubuntu-20.04
php: "7.4"
- os: ubuntu-20.04
php: "8.0"
- os: ubuntu-20.04
php: "8.1"
# Use "PHP 0.0" as job name instead of "php (ubuntu-, 0.0)"
name: PHP ${{ matrix.php }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2

- name: Use PHP ${{ matrix.php }}
run: sudo update-alternatives --set php /usr/bin/php${{ matrix.php }}

- name: composer install
run: composer install

- name: composer test
run: composer test
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[![CI Status](https://github.com/pleonasm/bloom-filter/actions/workflows/CI.yaml/badge.svg)](https://github.com/pleonasm/bloom-filter/actions/workflows/CI.yaml)

# A Bloom Filter for PHP #

This is a well tested implementation of a [Bloom Filter](http://en.wikipedia.org/wiki/Bloom_filter)
This is a well tested implementation of a [Bloom Filter](https://en.wikipedia.org/wiki/Bloom_filter)
for PHP. It has the following features:

1. Efficient memory use for bit array (as efficient as PHP can be anyway).
Expand All @@ -17,7 +19,7 @@ your path or in your project).

Put the following in your package.json:

```javascript
```json
{
"require": {
"pleonasm/bloom-filter": "*"
Expand Down
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"phpunit/phpunit": "^6.5 || ^7.5 || ^8.5 || ^9.4",
"php-coveralls/php-coveralls": "^2.0"
},
"scripts": {
"test": "phpunit"
},
"autoload": {
"psr-4": { "Pleo\\BloomFilter\\": "src/" }
}
Expand Down