Skip to content
Merged
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
37 changes: 33 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:

strategy:
matrix:
php_version: ['8.1', '8.2']
php_version: ['8.3', '8.4', '8.5']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6

- name: Cache Composer dependencies
uses: actions/cache@v3
uses: actions/cache@v5
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
Expand All @@ -40,6 +40,35 @@ jobs:
version: 2

- name: Run phpunit tests on php ${{ matrix.php_version }}
uses: php-actions/phpunit@v3
uses: php-actions/phpunit@v4
with:
php_version: "${{ matrix.php_version }}"
configuration: phpunit.xml

coverage:
name: Code coverage
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- name: Setup PHP with pcov
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
coverage: pcov
tools: composer:v2

- name: Install dependencies
run: composer install --no-interaction --no-progress

- name: Run phpunit with coverage
run: vendor/bin/phpunit --coverage-clover coverage.xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v7
with:
files: coverage.xml
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
10 changes: 0 additions & 10 deletions .scrutinizer.yml

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Simple bitmask implementation

[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Packagist](https://img.shields.io/packagist/v/aliance/bitmask.svg)](https://packagist.org/packages/aliance/bitmask)
![PHP Version](https://img.shields.io/badge/PHP-8.1-green.svg)
[![Code Coverage](https://scrutinizer-ci.com/g/Aliance/Bitmask/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/Aliance/Bitmask/?branch=master)
![PHP Version](https://img.shields.io/badge/PHP-8.3-green.svg)
[![Code Coverage](https://codecov.io/gh/Aliance/Bitmask/branch/master/graph/badge.svg)](https://codecov.io/gh/Aliance/Bitmask)

About
---
Expand Down Expand Up @@ -34,7 +34,7 @@ Usage
See usage in [sample](./example/example.php) file.

```bash
docker run -it --rm -v "$PWD":/usr/src/bitmask -w /usr/src/bitmask php:8.1-cli php example/example.php
docker run -it --rm -v "$PWD":/usr/src/bitmask -w /usr/src/bitmask php:8.3-cli php example/example.php
```
```
Check user for all access levels:
Expand All @@ -58,7 +58,7 @@ Tests

For completely tests running just call `composer exec phpunit` or use
```bash
docker run -it --rm -v "$PWD":/usr/src/bitmask -w /usr/src/bitmask php:8.1-cli php ./vendor/bin/phpunit
docker run -it --rm -v "$PWD":/usr/src/bitmask -w /usr/src/bitmask php:8.3-cli php ./vendor/bin/phpunit
```

License
Expand Down
9 changes: 7 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,15 @@
"Aliance\\Bitmask\\Tests\\": "tests/"
}
},
"config": {
"platform": {
"php": "8.3"
}
},
"require": {
"php-64bit": ">=8.1"
"php-64bit": ">=8.3"
},
"require-dev": {
"phpunit/phpunit": "^9"
"phpunit/phpunit": "^12"
}
}
Loading