Skip to content

Commit 291ac89

Browse files
authored
Bugfixes to CircleCI and make it work (#35)
1 parent 8ee8fef commit 291ac89

12 files changed

+70
-227
lines changed

.circleci/config.yml

+61-12
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,66 @@
11
version: 2.1
2+
3+
orbs:
4+
composer: stockfiller/composer@0.0.38
5+
php-cs-fixer: stockfiller/php-cs-fixer@0.0.18
6+
phpunit: stockfiller/phpunit@0.0.13
7+
28
executors:
3-
default:
9+
php74:
410
docker:
5-
- image: cimg/php:7.0
6-
- image: cimg/php:7.1
7-
- image: cimg/php:7.2
8-
- image: cimg/php:7.3
9-
- image: cimg/php:7.4
10-
orbs:
11-
php-coveralls: nekman/php-coveralls@0.0.1
12-
php-cs-fixer: stockfiller/php-cs-fixer@0.0.10
11+
- image: php:7.4-alpine
12+
resource_class: small
13+
php80:
14+
docker:
15+
- image: php:8.0-alpine
16+
resource_class: small
17+
18+
commands:
19+
install_xdebug:
20+
steps:
21+
- run:
22+
name: Install PCOV and Git
23+
command: |-
24+
apk add --update --no-cache ${PHPIZE_DEPS} git
25+
pecl install pcov-1.0.6
26+
docker-php-ext-enable pcov
27+
1328
workflows:
14-
foo:
29+
master:
30+
jobs:
31+
- phpunit/test: &unit-tests
32+
name: unit-tests
33+
matrix:
34+
parameters:
35+
executor:
36+
- php74
37+
- php80
38+
pre-steps:
39+
- composer/install_bin
40+
filters:
41+
branches:
42+
only: master
43+
branch:
1544
jobs:
16-
- php-coveralls/test_and_upload
17-
- php-cs-fixer/fix
45+
- php-cs-fixer/fix:
46+
name: coding-standards
47+
executor: php74
48+
rules: "@PSR2"
49+
pre-steps:
50+
- composer/install_bin
51+
filters: &branch-filters
52+
branches:
53+
ignore: master
54+
- phpunit/test:
55+
<<: *unit-tests
56+
flags: --coverage-clover coverage/clover.xml
57+
pre-steps:
58+
- install_xdebug
59+
- composer/install_bin
60+
post-steps:
61+
- run: php vendor/bin/php-coveralls --verbose
62+
- store_artifacts:
63+
path: coverage/clover.xml
64+
filters: *branch-filters
65+
requires:
66+
- coding-standards

.coveralls.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
service_name: travis-ci
2-
coverage_clover: /tmp/coverage-clover.xml
3-
json_path: /tmp/coveralls-upload.json
1+
json_path: coverage/coveralls.json
2+
coverage_clover: coverage/clover.xml
3+
service_name: circleci

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ nbproject/
33
.idea/
44
.php_cs.cache
55
.phpunit.result.cache
6+
coverage
7+
test-results
68

79
# Eclipse
810
.buildpath

.php_cs.dist

-14
This file was deleted.

.travis.yml

-23
This file was deleted.

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2018 Niklas Ekman
3+
Copyright (c) 2021 Niklas Ekman
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Luhn Algorithm
22

3-
[![Build Status](https://travis-ci.org/Ekman/Luhn-Algorithm.svg?branch=master)](https://travis-ci.org/Ekman/Luhn-Algorithm)
3+
[![Build Status](https://circleci.com/github/Ekman/luhn-algorithm.svg?style=shield)](https://app.circleci.com/pipelines/github/Ekman)
44
[![Coverage Status](https://coveralls.io/repos/github/Ekman/luhn-algorithm/badge.svg?branch=master)](https://coveralls.io/github/Ekman/luhn-algorithm?branch=master)
55

66
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).

composer.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"php-coveralls/php-coveralls": "^2.1"
4545
},
4646
"scripts": {
47-
"lint": "php-cs-fixer fix",
48-
"test": "phpunit --configuration phpunit.xml"
47+
"test": "phpunit"
4948
}
5049
}

coverage/clover.xml

-105
This file was deleted.

phpunit.xml

-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
<include>
66
<directory suffix=".php">src</directory>
77
</include>
8-
<report>
9-
<clover outputFile="/tmp/coverage-clover.xml"/>
10-
</report>
118
</coverage>
129
<testsuites>
1310
<testsuite name="Luhn Algorithm tests">

0 commit comments

Comments
 (0)