diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml
index 5e495b2b91..8fd62f6353 100644
--- a/.github/workflows/continuous-integration.yml
+++ b/.github/workflows/continuous-integration.yml
@@ -12,11 +12,117 @@ on:
name: "Continuous Integration"
jobs:
- hello:
- name: "Hello"
+ coding-standards:
+ name: "Coding Standards"
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ php-version:
+ - 7.2
+
+ steps:
+ - name: "Checkout"
+ uses: actions/checkout@v1
+
+ - name: "Install PHP with extensions"
+ uses: shivammathur/setup-php@v1
+ with:
+ coverage: none
+ extension-csv: "intl"
+ php-version: ${{ matrix.php-version }}
+
+ - name: "Cache dependencies installed with composer"
+ uses: actions/cache@v1
+ with:
+ path: ~/.composer/cache
+ key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
+ restore-keys: |
+ php${{ matrix.php-version }}-composer-
+
+ - name: "Install dependencies with composer"
+ run: $(which composer) install --no-interaction --no-progress --no-suggest
+
+ - name: "Run squizlabs/php_codesniffer"
+ run: vendor/bin/phpcs --standard=PSR2 src -n
+
+ tests:
+ name: "Tests"
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ php-version:
+ - 7.2
+ - 7.3
+ - 7.4
+
steps:
- - name: "Hello"
- run: echo "Hello, François and Pim!"
+ - name: "Checkout"
+ uses: actions/checkout@v1
+
+ - name: "Install PHP with extensions"
+ uses: shivammathur/setup-php@v1
+ with:
+ coverage: none
+ extension-csv: "intl"
+ php-version: ${{ matrix.php-version }}
+
+ - name: "Cache dependencies installed with composer"
+ uses: actions/cache@v1
+ with:
+ path: ~/.composer/cache
+ key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
+ restore-keys: |
+ php${{ matrix.php-version }}-composer-
+
+ - name: "Install dependencies with composer"
+ run: $(which composer) install --no-interaction --no-progress --no-suggest
+
+ - name: "Run tests with phpunit/phpunit"
+ run: vendor/bin/phpunit
+
+ code-coverage:
+ name: "Code Coverage"
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ php-version:
+ - 7.4
+
+ steps:
+ - name: "Checkout"
+ uses: actions/checkout@v1
+
+ - name: "Install PHP with extensions"
+ uses: shivammathur/setup-php@v1
+ with:
+ coverage: xdebug
+ extension-csv: "intl"
+ php-version: ${{ matrix.php-version }}
+
+ - name: "Cache dependencies installed with composer"
+ uses: actions/cache@v1
+ with:
+ path: ~/.composer/cache
+ key: php${{ matrix.php-version }}-composer-locked-${{ hashFiles('**/composer.json') }}
+ restore-keys: |
+ php${{ matrix.php-version }}-composer-locked-
+
+ - name: "Install locked dependencies with composer"
+ run: $(which composer) install --no-interaction --no-progress --no-suggest
+
+ - name: "Create build directory"
+ run: mkdir -p .build/logs
+
+ - name: "Collect code coverage with Xdebug and phpunit/phpunit"
+ run: vendor/bin/phpunit --coverage-clover=.build/logs/clover.xml
+
+ - name: "Send code coverage report to Codecov.io"
+ env:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
+ run: bash <(curl -s https://codecov.io/bash)
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 4279b47f8b..0000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-language: php
-
-dist: precise
-
-php:
- - 7.2
- - 7.3
- - nightly
-
-matrix:
- allow_failures:
- - nightly
-
-cache:
- directories:
- - $HOME/.composer/cache
-
-before_install:
- - phpenv config-rm xdebug.ini || true
-
-before_script:
- - travis_retry composer install --no-interaction --prefer-dist
-
-script: make sniff test
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index f871fdada8..af082d9dff 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -11,4 +11,10 @@
./test/Faker/
+
+
+
+ src/
+
+
diff --git a/readme.md b/readme.md
index c9bac035e9..ea9c64f426 100644
--- a/readme.md
+++ b/readme.md
@@ -1,5 +1,8 @@
# Faker
+[](https://github.com/fzaninotto/Faker/actions)
+[](https://codecov.io/gh/fzaninotto/Faker)
+
Faker is a PHP library that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in your persistence to stress test it, or anonymize data taken from a production service, Faker is for you.
Faker is heavily inspired by Perl's [Data::Faker](http://search.cpan.org/~jasonk/Data-Faker-0.07/), and by ruby's [Faker](https://rubygems.org/gems/faker).
@@ -53,7 +56,7 @@ composer require fzaninotto/faker
### Autoloading
-Faker supports both `PSR-0` as `PSR-4` autoloaders.
+Faker supports both `PSR-0` as `PSR-4` autoloaders.
```php