Skip to content
This repository was archived by the owner on Dec 11, 2020. It is now read-only.

Commit d8104c1

Browse files
committed
Enhancement: Run builds on master using GitHub Actions
1 parent 3201746 commit d8104c1

File tree

5 files changed

+146
-66
lines changed

5 files changed

+146
-66
lines changed

Diff for: .gitattributes

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/test/ export-ignore
22
/.gitattributes export-ignore
33
/.gitignore export-ignore
4-
/.travis.yml export-ignore
54
/CONTRIBUTING.md export-ignore
65
/Makefile export-ignore
76
/phpunit.xml.dist export-ignore

Diff for: .github/workflows/continuous-integration.yml

+144
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- "master"
8+
tags:
9+
- "**"
10+
11+
name: "Continuous Integration"
12+
13+
jobs:
14+
coding-standards:
15+
name: "Coding Standards"
16+
17+
runs-on: "ubuntu-latest"
18+
19+
strategy:
20+
matrix:
21+
php-version:
22+
- "5.3"
23+
24+
steps:
25+
- name: "Checkout"
26+
uses: "actions/checkout@v2"
27+
28+
- name: "Install PHP with extensions"
29+
uses: "shivammathur/setup-php@v2"
30+
with:
31+
coverage: "none"
32+
extensions: "intl"
33+
php-version: "${{ matrix.php-version }}"
34+
35+
- name: "Determine composer cache directory"
36+
id: "determine-composer-cache-directory"
37+
run: "echo \"::set-output name=directory::$(composer config cache-dir)\""
38+
39+
- name: "Cache dependencies installed with composer"
40+
uses: "actions/cache@v1"
41+
with:
42+
path: "${{ steps.determine-composer-cache-directory.outputs.directory }}"
43+
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
44+
restore-keys: "php-${{ matrix.php-version }}-composer-"
45+
46+
- name: "Install dependencies with composer"
47+
run: "composer install --no-interaction --no-progress --no-suggest"
48+
49+
- name: "Run squizlabs/php_codesniffer"
50+
run: "vendor/bin/phpcs --standard=PSR2 src -n"
51+
52+
tests:
53+
name: "Tests"
54+
55+
runs-on: "ubuntu-latest"
56+
57+
strategy:
58+
matrix:
59+
php-version:
60+
- "5.3"
61+
- "5.4"
62+
- "5.5"
63+
- "5.6"
64+
- "7.0"
65+
- "7.1"
66+
- "7.2"
67+
- "7.3"
68+
- "7.4"
69+
70+
steps:
71+
- name: "Checkout"
72+
uses: "actions/checkout@v2"
73+
74+
- name: "Install PHP with extensions"
75+
uses: "shivammathur/setup-php@v2"
76+
with:
77+
coverage: "none"
78+
extensions: "intl"
79+
ini-values: "memory_limit=-1"
80+
php-version: "${{ matrix.php-version }}"
81+
82+
- name: "Determine composer cache directory"
83+
id: "determine-composer-cache-directory"
84+
run: "echo \"::set-output name=directory::$(composer config cache-dir)\""
85+
86+
- name: "Cache dependencies installed with composer"
87+
uses: "actions/cache@v1"
88+
with:
89+
path: "${{ steps.determine-composer-cache-directory.outputs.directory }}"
90+
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
91+
restore-keys: "php-${{ matrix.php-version }}-composer-"
92+
93+
- name: "Install dependencies with composer"
94+
run: "composer install --no-interaction --no-progress --no-suggest"
95+
96+
- name: "Run tests with phpunit/phpunit"
97+
run: "vendor/bin/phpunit"
98+
99+
code-coverage:
100+
name: "Code Coverage"
101+
102+
runs-on: "ubuntu-latest"
103+
104+
strategy:
105+
matrix:
106+
php-version:
107+
- "7.4"
108+
109+
steps:
110+
- name: "Checkout"
111+
uses: "actions/checkout@v2"
112+
113+
- name: "Install PHP with extensions"
114+
uses: "shivammathur/setup-php@v2"
115+
with:
116+
coverage: "xdebug"
117+
extensions: "intl"
118+
ini-values: "memory_limit=-1"
119+
php-version: "${{ matrix.php-version }}"
120+
121+
- name: "Determine composer cache directory"
122+
id: "determine-composer-cache-directory"
123+
run: "echo \"::set-output name=directory::$(composer config cache-dir)\""
124+
125+
- name: "Cache dependencies installed with composer"
126+
uses: "actions/cache@v1"
127+
with:
128+
path: "${{ steps.determine-composer-cache-directory.outputs.directory }}"
129+
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
130+
restore-keys: "php-${{ matrix.php-version }}-composer-"
131+
132+
- name: "Install dependencies with composer"
133+
run: "composer install --no-interaction --no-progress --no-suggest"
134+
135+
- name: "Create build directory"
136+
run: "mkdir -p .build/logs"
137+
138+
- name: "Collect code coverage with Xdebug and phpunit/phpunit"
139+
run: "vendor/bin/phpunit --coverage-clover=.build/logs/clover.xml"
140+
141+
- name: "Send code coverage report to Codecov.io"
142+
env:
143+
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
144+
run: "bash <(curl -s https://codecov.io/bash)"

Diff for: .travis.yml

-41
This file was deleted.

Diff for: .travis/xdebug.sh

-22
This file was deleted.

Diff for: readme.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Faker
22

33
[![Monthly Downloads](https://poser.pugx.org/fzaninotto/faker/d/monthly.png)](https://packagist.org/packages/fzaninotto/faker)
4-
[![Build Status](https://travis-ci.org/fzaninotto/Faker.svg?branch=master)](https://travis-ci.org/fzaninotto/Faker)
5-
[![Code Coverage](https://codecov.io/gh/fzaninotto/Faker/branch/master/graph/badge.svg)](https://codecov.io/gh/fzaninotto/Faker)
4+
[![Continuous Integration](https://github.com/fzaninotto/Faker/workflows/Continuous%20Integration/badge.svg?branch=master)](https://github.com/fzaninotto/Faker/actions)
5+
[![codecov](https://codecov.io/gh/fzaninotto/Faker/branch/master/graph/badge.svg)](https://codecov.io/gh/fzaninotto/Faker)
66
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/eceb78a9-38d4-4ad5-8b6b-b52f323e3549/mini.png)](https://insight.sensiolabs.com/projects/eceb78a9-38d4-4ad5-8b6b-b52f323e3549)
77

88
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.

0 commit comments

Comments
 (0)