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
73 changes: 61 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ nbproject/
.idea/
.php_cs.cache
.phpunit.result.cache
coverage
test-results

# Eclipse
.buildpath
Expand Down
14 changes: 0 additions & 14 deletions .php_cs.dist

This file was deleted.

23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Luhn Algorithm

[![Build Status](https://travis-ci.org/Ekman/Luhn-Algorithm.svg?branch=master)](https://travis-ci.org/Ekman/Luhn-Algorithm)
[![Build Status](https://circleci.com/github/Ekman/luhn-algorithm.svg?style=shield)](https://app.circleci.com/pipelines/github/Ekman)
[![Coverage Status](https://coveralls.io/repos/github/Ekman/luhn-algorithm/badge.svg?branch=master)](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).
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"php-coveralls/php-coveralls": "^2.1"
},
"scripts": {
"lint": "php-cs-fixer fix",
"test": "phpunit --configuration phpunit.xml"
"test": "phpunit"
}
}
105 changes: 0 additions & 105 deletions coverage/clover.xml

This file was deleted.

3 changes: 0 additions & 3 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
<include>
<directory suffix=".php">src</directory>
</include>
<report>
<clover outputFile="/tmp/coverage-clover.xml"/>
</report>
</coverage>
<testsuites>
<testsuite name="Luhn Algorithm tests">
Expand Down
Loading