diff --git a/.circleci/config.yml b/.circleci/config.yml
index 2672583..b53f499 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -1,17 +1,66 @@
version: 2.1
+
+orbs:
+ composer: stockfiller/composer@0.0.38
+ php-cs-fixer: stockfiller/php-cs-fixer@0.0.18
+ phpunit: stockfiller/phpunit@0.0.13
+
executors:
- default:
+ php74:
docker:
- - image: cimg/php:7.0
- - image: cimg/php:7.1
- - image: cimg/php:7.2
- - image: cimg/php:7.3
- - image: cimg/php:7.4
-orbs:
- php-coveralls: nekman/php-coveralls@0.0.1
- php-cs-fixer: stockfiller/php-cs-fixer@0.0.10
+ - image: php:7.4-alpine
+ resource_class: small
+ php80:
+ docker:
+ - image: php:8.0-alpine
+ resource_class: small
+
+commands:
+ install_xdebug:
+ steps:
+ - run:
+ name: Install PCOV and Git
+ command: |-
+ apk add --update --no-cache ${PHPIZE_DEPS} git
+ pecl install pcov-1.0.6
+ docker-php-ext-enable pcov
+
workflows:
- foo:
+ master:
+ jobs:
+ - phpunit/test: &unit-tests
+ name: unit-tests
+ matrix:
+ parameters:
+ executor:
+ - php74
+ - php80
+ pre-steps:
+ - composer/install_bin
+ filters:
+ branches:
+ only: master
+ branch:
jobs:
- - php-coveralls/test_and_upload
- - php-cs-fixer/fix
+ - php-cs-fixer/fix:
+ name: coding-standards
+ executor: php74
+ rules: "@PSR2"
+ pre-steps:
+ - composer/install_bin
+ filters: &branch-filters
+ branches:
+ ignore: master
+ - phpunit/test:
+ <<: *unit-tests
+ flags: --coverage-clover coverage/clover.xml
+ pre-steps:
+ - install_xdebug
+ - composer/install_bin
+ post-steps:
+ - run: php vendor/bin/php-coveralls --verbose
+ - store_artifacts:
+ path: coverage/clover.xml
+ filters: *branch-filters
+ requires:
+ - coding-standards
diff --git a/.coveralls.yml b/.coveralls.yml
index 351146f..9db1085 100644
--- a/.coveralls.yml
+++ b/.coveralls.yml
@@ -1,3 +1,3 @@
-service_name: travis-ci
-coverage_clover: /tmp/coverage-clover.xml
-json_path: /tmp/coveralls-upload.json
+json_path: coverage/coveralls.json
+coverage_clover: coverage/clover.xml
+service_name: circleci
diff --git a/.gitignore b/.gitignore
index bcf880b..6d7e6a1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,8 @@ nbproject/
.idea/
.php_cs.cache
.phpunit.result.cache
+coverage
+test-results
# Eclipse
.buildpath
diff --git a/.php_cs.dist b/.php_cs.dist
deleted file mode 100644
index a70eec1..0000000
--- a/.php_cs.dist
+++ /dev/null
@@ -1,14 +0,0 @@
-setRules([
- '@PSR2' => true,
- 'ordered_imports' => true,
- 'phpdoc_order' => true,
- 'simplified_null_return' => false,
- 'no_unused_imports' => true,
- ])->setFinder(
- PhpCsFixer\Finder::create()
- ->in(__DIR__.'/src')
- ->in(__DIR__.'/tests')
- );
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 2bddeda..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: php
-
-php:
- - 7.4
- - 8.0
- - nightly
-
-matrix:
- allow_failures:
- - php: nightly
-
-install: composer update --no-interaction --classmap-authoritative --no-suggest --ignore-platform-reqs --prefer-lowest
-
-script: vendor/bin/phpunit --configuration phpunit.xml
-
-after_success: vendor/bin/php-coveralls --verbose
-
-notifications:
- email: false
-
-cache:
- directories:
- - $HOME/.composer
diff --git a/LICENSE.md b/LICENSE.md
index 7e3b91a..829363d 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2018 Niklas Ekman
+Copyright (c) 2021 Niklas Ekman
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
diff --git a/README.md b/README.md
index 69e5912..ccf8527 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Luhn Algorithm
-[](https://travis-ci.org/Ekman/Luhn-Algorithm)
+[](https://app.circleci.com/pipelines/github/Ekman)
[](https://coveralls.io/github/Ekman/luhn-algorithm?branch=master)
This is a zero dependency implementation of the Luhn Algorithm for PHP 7.0 and above. The Luhn Algorithm is used to validate things like credit cards and national identification numbers. More information on the algorithm can be found at [Wikipedia](http://en.wikipedia.org/wiki/Luhn_algorithm).
diff --git a/composer.json b/composer.json
index e4f8964..9564577 100644
--- a/composer.json
+++ b/composer.json
@@ -44,7 +44,6 @@
"php-coveralls/php-coveralls": "^2.1"
},
"scripts": {
- "lint": "php-cs-fixer fix",
- "test": "phpunit --configuration phpunit.xml"
+ "test": "phpunit"
}
}
diff --git a/coverage/clover.xml b/coverage/clover.xml
deleted file mode 100644
index becd19c..0000000
--- a/coverage/clover.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/phpunit.xml b/phpunit.xml
index 53a68fa..494425d 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -5,9 +5,6 @@
src
-
-
-
diff --git a/test-results/junit.xml b/test-results/junit.xml
deleted file mode 100644
index e1506be..0000000
--- a/test-results/junit.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/LuhnAlgorithmFactoryTest.php b/tests/LuhnAlgorithmFactoryTest.php
index 1ee1a05..cbb88f7 100644
--- a/tests/LuhnAlgorithmFactoryTest.php
+++ b/tests/LuhnAlgorithmFactoryTest.php
@@ -29,7 +29,7 @@
use Nekman\LuhnAlgorithm\LuhnAlgorithmFactory;
use PHPUnit\Framework\TestCase;
-class LuhmAlgorithmFactoryTest extends TestCase
+class LuhnAlgorithmFactoryTest extends TestCase
{
public function testCreate()
{