Skip to content

Commit 8cec203

Browse files
authored
Add GitHub Actions (#1101)
* Add GitHub Actions * Update GitHub Actions * Add low/high dependencies * Update low/high dependencies * Disable fail fast See https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast * Update GitHub Actions * Update GitHub Action name * Create provider.yml * Create component.yml * Update component.yml * Update provider.yml * Update component.yml * Update GitHub Action name * Update component.yml * Split tests with ext-geoip + Disable test for deprecated providers * Update provider.yml GeoIP extensions is not (yet?) available for PHP 8.0. * Update provider.yml Disable test for IP2LocationBinary because it needs binary file. Travis CI test has also never passed. * Update provider.yml Use `composer update` insted of `composer install`. * Update provider.yml Use `composer update` insted of `composer install`. * Update README.md * Delete .travis.yml * Delete .travis.yml for providers * Add GitHub Actions workflow for providers * Update provider.yml (Geoip) * Delete .travis.yml for components * Add GitHub Actions workflow for components
1 parent b7481a2 commit 8cec203

File tree

84 files changed

+1425
-804
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1425
-804
lines changed

.github/workflows/component.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Component
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
php-version: ['7.3', '7.4', '8.0']
18+
component: [Common, Http, Plugin]
19+
20+
name: PHP ${{ matrix.php-version }} / ${{ matrix.component }}
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
25+
- name: Use PHP ${{ matrix.php-version }}
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php-version }}
29+
extensions: curl
30+
31+
- name: Validate composer.json and composer.lock
32+
working-directory: ./src/${{ matrix.component }}
33+
run: composer validate
34+
35+
- name: Install dependencies
36+
working-directory: ./src/${{ matrix.component }}
37+
run: composer install --no-progress
38+
39+
- name: Run test suite
40+
working-directory: ./src/${{ matrix.component }}
41+
run: composer run-script test

.github/workflows/php.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: PHP Composer
1+
name: Geocoder
22

33
on:
44
push:

.github/workflows/provider.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Provider
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
name: PHP ${{ matrix.php-version }} / ${{ matrix.provider }}
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
php-version: ['7.3', '7.4', '8.0']
17+
provider:
18+
- AlgoliaPlaces
19+
- ArcGISOnline
20+
- AzureMaps
21+
- BingMaps
22+
- Cache
23+
- Chain
24+
- FreeGeoIp
25+
- GeoIP2
26+
# - GeoIPs
27+
- GeoPlugin
28+
- GeocodeEarth
29+
- Geonames
30+
- GoogleMaps
31+
- GoogleMapsPlaces
32+
- GraphHopper
33+
- Here
34+
- HostIp
35+
- IP2Location
36+
# - IP2LocationBinary
37+
- IpInfo
38+
- IpInfoDb
39+
- Ipstack
40+
- LocationIQ
41+
- MapQuest
42+
- Mapbox
43+
# - Mapzen
44+
- MaxMind
45+
- MaxMindBinary
46+
- Nominatim
47+
- OpenCage
48+
- OpenRouteService
49+
- Pelias
50+
- Photon
51+
- PickPoint
52+
- TomTom
53+
- Yandex
54+
steps:
55+
- uses: actions/checkout@v2
56+
- name: Use PHP ${{ matrix.php-version }}
57+
uses: shivammathur/setup-php@v2
58+
with:
59+
php-version: ${{ matrix.php-version }}
60+
extensions: curl
61+
- name: Validate composer.json and composer.lock
62+
working-directory: ./src/Provider/${{ matrix.provider }}
63+
run: composer validate
64+
- name: Install dependencies
65+
working-directory: ./src/Provider/${{ matrix.provider }}
66+
run: composer update --no-progress
67+
- name: Run test suite
68+
working-directory: ./src/Provider/${{ matrix.provider }}
69+
run: composer run-script test
70+
71+
test-ext-geoip:
72+
name: PHP ${{ matrix.php-version }} (geoip) / ${{ matrix.provider }}
73+
runs-on: ubuntu-latest
74+
strategy:
75+
fail-fast: false
76+
matrix:
77+
php-version: ['7.3', '7.4']
78+
provider:
79+
- Geoip
80+
steps:
81+
- uses: actions/checkout@v2
82+
- name: Use PHP ${{ matrix.php-version }}
83+
uses: shivammathur/setup-php@v2
84+
with:
85+
php-version: ${{ matrix.php-version }}
86+
extensions: curl, geoip
87+
- name: Validate composer.json and composer.lock
88+
working-directory: ./src/Provider/${{ matrix.provider }}
89+
run: composer validate
90+
- name: Install dependencies
91+
working-directory: ./src/Provider/${{ matrix.provider }}
92+
run: composer update --no-progress
93+
- name: Run test suite
94+
working-directory: ./src/Provider/${{ matrix.provider }}
95+
run: composer run-script test

.travis.yml

Lines changed: 0 additions & 87 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
# Geocoder
22

3-
[![Build Status](https://travis-ci.org/geocoder-php/Geocoder.svg?branch=master)](https://img.shields.io/travis/geocoder-php/Geocoder?style=flat-square)
3+
[![Geocoder](https://github.com/geocoder-php/Geocoder/actions/workflows/php.yml/badge.svg)](https://github.com/geocoder-php/Geocoder/actions/workflows/php.yml)
44
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
55

66
> **Important:** You are browsing the documentation of Geocoder **4.x**.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Component
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
name: PHP ${{ matrix.php-version }}
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
php-version: ['7.3', '7.4', '8.0']
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Use PHP ${{ matrix.php-version }}
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: ${{ matrix.php-version }}
23+
extensions: curl
24+
- name: Validate composer.json and composer.lock
25+
run: composer validate --strict
26+
- name: Install dependencies
27+
run: composer update --prefer-stable --prefer-dist --no-progress
28+
- name: Run test suite
29+
run: composer run-script test-ci
30+
- name: Upload Coverage report
31+
run: |
32+
wget https://scrutinizer-ci.com/ocular.phar
33+
php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml

src/Common/.travis.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Component
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
name: PHP ${{ matrix.php-version }}
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
php-version: ['7.3', '7.4', '8.0']
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Use PHP ${{ matrix.php-version }}
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: ${{ matrix.php-version }}
23+
extensions: curl
24+
- name: Validate composer.json and composer.lock
25+
run: composer validate --strict
26+
- name: Install dependencies
27+
run: composer update --prefer-stable --prefer-dist --no-progress
28+
- name: Run test suite
29+
run: composer run-script test-ci
30+
- name: Upload Coverage report
31+
run: |
32+
wget https://scrutinizer-ci.com/ocular.phar
33+
php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml

src/Http/.travis.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Component
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
name: PHP ${{ matrix.php-version }}
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
php-version: ['7.3', '7.4', '8.0']
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Use PHP ${{ matrix.php-version }}
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: ${{ matrix.php-version }}
23+
extensions: curl
24+
- name: Validate composer.json and composer.lock
25+
run: composer validate --strict
26+
- name: Install dependencies
27+
run: composer update --prefer-stable --prefer-dist --no-progress
28+
- name: Run test suite
29+
run: composer run-script test-ci
30+
- name: Upload Coverage report
31+
run: |
32+
wget https://scrutinizer-ci.com/ocular.phar
33+
php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml

0 commit comments

Comments
 (0)