Compare commits
No commits in common. "1.x" and "v1.0.0" have entirely different histories.
|
@ -1,38 +0,0 @@
|
||||||
name: PHP Composer
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master, 1.x ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ master, 1.x ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Validate composer.json and composer.lock
|
|
||||||
run: composer validate
|
|
||||||
|
|
||||||
- name: Cache Composer packages
|
|
||||||
id: composer-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: vendor
|
|
||||||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-php-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
if: steps.composer-cache.outputs.cache-hit != 'true'
|
|
||||||
run: composer install --prefer-dist --no-progress --no-suggest
|
|
||||||
|
|
||||||
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
|
|
||||||
# Docs: https://getcomposer.org/doc/articles/scripts.md
|
|
||||||
- name: Tests
|
|
||||||
run: vendor/bin/phpunit
|
|
||||||
# - name: Run test suite
|
|
||||||
# run: composer run-script test
|
|
|
@ -1,48 +0,0 @@
|
||||||
name: Tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ 0.x ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ 0.x ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
php: ['7.3', '7.4', '8.0']
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Validate composer.json and composer.lock
|
|
||||||
run: composer validate
|
|
||||||
|
|
||||||
- name: Cache Composer packages
|
|
||||||
id: composer-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: vendor
|
|
||||||
key: ${{ matrix-php }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
||||||
restore-keys: ${{ matrix.php }}-composer-
|
|
||||||
|
|
||||||
- name: Setup PHP
|
|
||||||
uses: shivammathur/setup-php@v2
|
|
||||||
with:
|
|
||||||
coverage: "none"
|
|
||||||
extensions: "json,sodium"
|
|
||||||
php-version: "${{ matrix.php }}"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
if: steps.composer-cache.outputs.cache-hit != 'true'
|
|
||||||
run: composer install --prefer-dist --no-progress --no-suggest
|
|
||||||
|
|
||||||
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
|
|
||||||
# Docs: https://getcomposer.org/doc/articles/scripts.md
|
|
||||||
- name: Run tests
|
|
||||||
run: vendor/bin/phpunit -v
|
|
||||||
|
|
||||||
# - name: Run test suite
|
|
||||||
# run: composer run-script test
|
|
|
@ -1,47 +0,0 @@
|
||||||
# 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
|
|
|
@ -2,13 +2,7 @@
|
||||||
|
|
||||||
### Small library to generate unique private mac addresses
|
### Small library to generate unique private mac addresses
|
||||||
|
|
||||||
[](https://repos.bgemi.net/sikofitt/generate-mac/-/commits/1.x)
|
|
||||||
[](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
|
||||||
|
@ -98,4 +92,4 @@ user@localhost:~/generate-mac$ vendor/bin/phpunit
|
||||||
|
|
||||||
#### License
|
#### License
|
||||||
|
|
||||||
[GPL-3.0](LICENSE)
|
[GPL-3.0](LICENSE)
|
|
@ -3,7 +3,7 @@
|
||||||
"description": "Generates dummy mac addresses",
|
"description": "Generates dummy mac addresses",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.2",
|
"php": "^8.0",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-sodium": "*"
|
"ext-sodium": "*"
|
||||||
},
|
},
|
||||||
|
@ -13,11 +13,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"composer/xdebug-handler": "^3.0",
|
"friendsofphp/php-cs-fixer": "^2.18",
|
||||||
"friendsofphp/php-cs-fixer": "^3.17",
|
"phpunit/phpunit": "^9.5",
|
||||||
"phpunit/phpunit": "^9.6",
|
"squizlabs/php_codesniffer": "^3.5",
|
||||||
"squizlabs/php_codesniffer": "^3.7",
|
"symfony/console": "^5.2"
|
||||||
"symfony/console": "^6.3"
|
|
||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|
Loading…
Reference in New Issue