Compare commits

...

10 Commits
1.x ... 2.x

3 changed files with 60 additions and 6 deletions

47
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,47 @@
# Select what we should cache between builds
cache:
paths:
- vendor/
before_script:
- apt-get update -yqq
- apt-get install -yqq git unzip
# Install PHP extensions
# Install & enable Xdebug for code coverage reports
- pecl install xdebug
- docker-php-ext-enable xdebug
# Install and run Composer
- curl -sS https://getcomposer.org/installer | php
- php composer.phar install
# Set any variables we need
variables:
XDEBUG_MODE: coverage
# Run our tests
# If Xdebug was installed you can generate a coverage report and see code coverage metrics.
test:7.3:
tags:
- default
image: php:7.3
only:
- 0.x@sikofitt/generate-mac
script:
- vendor/bin/phpunit --configuration phpunit.xml.dist --coverage-text --colors=never
test:7.4:
tags:
- default
image: php:7.4
only:
- 0.x@sikofitt/generate-mac
script:
- vendor/bin/phpunit --configuration phpunit.xml.dist --coverage-text --colors=never
test:8.0:
tags:
- default
image: php:8.0
only:
- branches
script:
- vendor/bin/phpunit --configuration phpunit.xml.dist --coverage-text --colors=never

View File

@ -2,7 +2,13 @@
### Small library to generate unique private mac addresses ### Small library to generate unique private mac addresses
[![pipeline status](https://repos.bgemi.net/sikofitt/generate-mac/badges/1.x/pipeline.svg)](https://repos.bgemi.net/sikofitt/generate-mac/-/commits/1.x)
[![coverage report](https://repos.bgemi.net/sikofitt/generate-mac/badges/1.x/coverage.svg)](https://repos.bgemi.net/sikofitt/generate-mac/-/commits/1.x)
#### Install #### Install
Requires PHP v8.0, For versions compatible with PHP >= 7.3 use the 0.x branch.
[composer](https://getcomposer.org) [composer](https://getcomposer.org)
```bash ```bash
composer require sikofitt/generate-mac composer require sikofitt/generate-mac

View File

@ -3,7 +3,7 @@
"description": "Generates dummy mac addresses", "description": "Generates dummy mac addresses",
"type": "library", "type": "library",
"require": { "require": {
"php": "^8.0", "php": "^8.2",
"ext-json": "*", "ext-json": "*",
"ext-sodium": "*" "ext-sodium": "*"
}, },
@ -13,10 +13,11 @@
} }
}, },
"require-dev": { "require-dev": {
"friendsofphp/php-cs-fixer": "^2.18", "composer/xdebug-handler": "^3.0",
"phpunit/phpunit": "^9.5", "friendsofphp/php-cs-fixer": "^3.17",
"squizlabs/php_codesniffer": "^3.5", "phpunit/phpunit": "^9.6",
"symfony/console": "^5.2" "squizlabs/php_codesniffer": "^3.7",
"symfony/console": "^6.3"
}, },
"autoload-dev": { "autoload-dev": {
"psr-4": { "psr-4": {