Skip to content

Commit c42a8d7

Browse files
committed
Migrate to GitHub action
1 parent 0b855c6 commit c42a8d7

File tree

4 files changed

+49
-30
lines changed

4 files changed

+49
-30
lines changed

.github/workflows/tests.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
8+
jobs:
9+
phpunit:
10+
name: PHPUnit with PHP ${{ matrix.php-version }}
11+
strategy:
12+
matrix:
13+
php-version:
14+
- '7.3'
15+
- '7.4'
16+
- '8.0'
17+
- '8.1'
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v3
23+
24+
- name: Install PHP with extensions
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
coverage: none
28+
extensions: intl
29+
php-version: ${{ matrix.php-version }}
30+
31+
- name: Get composer cache directory
32+
id: composer-cache
33+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
34+
35+
- name: Cache dependencies
36+
uses: actions/cache@v3
37+
with:
38+
path: ${{ steps.composer-cache.outputs.dir }}
39+
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}
40+
restore-keys: |
41+
composer-${{ runner.os }}-${{ matrix.php-version }}-
42+
43+
- name: Download dependencies
44+
run: composer update --no-interaction --no-progress --optimize-autoloader
45+
46+
- name: Run tests
47+
run: ./vendor/bin/phpunit

.travis.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Gravatar image provider for Faker
22

3-
[![Build Status](https://travis-ci.org/ottaviano/faker-gravatar.svg?branch=master)](https://travis-ci.org/ottaviano/faker-gravatar)
3+
[![Tests](https://github.com/ottaviano/faker-gravatar/actions/workflows/tests.yaml/badge.svg?branch=master)](https://github.com/ottaviano/faker-gravatar/actions/workflows/tests.yaml)
44

55
It is [Gravatar](https://en.gravatar.com/site/implement/images/) image provider for [fzaninotto/Faker](https://github.com/fzaninotto/Faker)
66

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"php": "^7.1|^8.0"
1515
},
1616
"require-dev": {
17-
"fzaninotto/faker": "^1.9",
17+
"fzaninotto/faker": "^1.5",
1818
"phpunit/phpunit": "^9.5",
1919
"ext-curl": "*"
2020
},

0 commit comments

Comments
 (0)