Skip to content

Commit 6666c0f

Browse files
switch to github actions (#96)
* switch to github actions * run tests * Apply fixes from StyleCI (#97) Co-authored-by: StyleCI Bot <[email protected]> * fix phpunit * fix master vs main * fix composer validation Co-authored-by: StyleCI Bot <[email protected]>
1 parent 6d73c26 commit 6666c0f

39 files changed

+209
-231
lines changed

.bash/functions.shlib

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

.coveralls.yml

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

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
trim_trailing_whitespace = true
7+
insert_final_newline = true
8+
indent_size = 2
9+
indent_style = space
10+
11+
[Makefile]
12+
indent_size = 4
13+
indent_style = tab
14+
15+
[*.php]
16+
indent_size = 4

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
.gitattributes export-ignore
22
.gitignore export-ignore
33
.travis.yml export-ignore
4-
phpunit.xml.dist export-ignore
4+
phpunit.xml.dist export-ignore

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
4+
- package-ecosystem: github-actions
5+
directory: /
6+
schedule:
7+
interval: daily
8+
9+
- package-ecosystem: composer
10+
directory: /
11+
schedule:
12+
interval: daily
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: build and publish
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- '*'
9+
pull_request:
10+
branches:
11+
- main
12+
13+
env:
14+
TERM: xterm-256color
15+
16+
jobs:
17+
build-and-publish:
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
php-version:
22+
- 5.5
23+
- 7.2
24+
- 7.3
25+
- 7.4
26+
- 8.0
27+
- 8.1
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v3
32+
with:
33+
fetch-depth: 0
34+
35+
- name: Setup PHP
36+
uses: shivammathur/setup-php@v2
37+
with:
38+
php-version: ${{ matrix.php-version }}
39+
40+
- name: Set RUN_COVERAGE
41+
run: |
42+
echo "RUN_COVERAGE=true" >> $GITHUB_ENV
43+
if: matrix.php-version == '8.1'
44+
45+
- name: Build
46+
run: make build
47+
48+
- name: Test
49+
run: make test
50+
51+
- name: Clover to LCOV
52+
uses: andstor/clover2lcov-action@v1
53+
with:
54+
src: build/clover.xml
55+
dst: build/lcov.info
56+
if: matrix.php-version == '8.1'
57+
58+
- name: Coveralls
59+
uses: coverallsapp/[email protected]
60+
with:
61+
github-token: ${{ secrets.GITHUB_TOKEN }}
62+
path-to-lcov: build/lcov.info
63+
if: matrix.php-version == '8.1'

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@
66
/.buildpath
77
/.project
88
# Intellij IDEA
9-
/.idea
9+
/.idea/
1010
*.iml
1111

1212
# composer
1313
/vendor/
14+
/composer.lock
1415

1516
# configs
1617
/config.php
1718
/coza/
1819

1920
# build
2021
/build/
22+
/.phpunit.result.cache

.travis.yml

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

Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
SHELL := bash
2+
3+
4+
.PHONY: all
5+
all:
6+
7+
8+
.PHONY: build
9+
build:
10+
composer validate
11+
composer install \
12+
--no-interaction \
13+
--prefer-dist
14+
15+
16+
.PHONY: test
17+
test:
18+
ifeq ($(RUN_COVERAGE),true)
19+
mkdir -p build
20+
XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text --coverage-clover build/clover.xml
21+
else
22+
vendor/bin/phpunit
23+
endif

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
[![Build Status](https://travis-ci.org/AfriCC/php-epp2.svg?branch=master)](https://travis-ci.org/AfriCC/php-epp2)
2-
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/AfriCC/php-epp2/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/AfriCC/php-epp2/?branch=master)
3-
[![Coverage Status](https://coveralls.io/repos/github/AfriCC/php-epp2/badge.svg?branch=master)](https://coveralls.io/github/AfriCC/php-epp2?branch=master)
1+
[![build and publish](https://github.com/AfriCC/php-epp2/actions/workflows/build-and-publish.yml/badge.svg)](https://github.com/AfriCC/php-epp2/actions/workflows/build-and-publish.yml)
2+
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/AfriCC/php-epp2/badges/quality-score.png?b=main)](https://scrutinizer-ci.com/g/AfriCC/php-epp2/?branch=main)
3+
[![Coverage Status](https://coveralls.io/repos/github/AfriCC/php-epp2/badge.svg?branch=main)](https://coveralls.io/github/AfriCC/php-epp2?branch=main)
44
[![Latest Stable Version](https://poser.pugx.org/africc/php-epp2/v/stable.svg)](https://packagist.org/packages/africc/php-epp2)
55
[![Packagist](https://img.shields.io/packagist/dt/africc/php-epp2.svg)](https://packagist.org/packages/africc/php-epp2)
66
[![Latest Unstable Version](https://poser.pugx.org/africc/php-epp2/v/unstable.svg)](https://packagist.org/packages/africc/php-epp2)
@@ -66,8 +66,8 @@ $ composer require africc/php-epp2
6666
Usage
6767
-----
6868

69-
See the [examples](https://github.com/AfriCC/php-epp2/blob/master/examples)
70-
folder for a more or less complete usage reference. Additionally have a look at
69+
See the [examples](https://github.com/AfriCC/php-epp2/blob/main/examples)
70+
folder for a more or less complete usage reference. Additionally have a look at
7171
[whmcs-registrars-coza](https://github.com/AfriCC/whmcs-registrars-coza)
7272
which is a [WHMCS](https://www.whmcs.com) Registrar Module for the
7373
[co.za zone](https://www.registry.net.za) using this library.
@@ -173,7 +173,7 @@ foreach ($data['chkData']['cd'] as $cd) {
173173
```
174174
### Custom ObjectSpec
175175

176-
If registrar you're working with uses custom namespace names (eg NASK) you can
176+
If registrar you're working with uses custom namespace names (eg NASK) you can
177177
use custom ObjectSpec. Clients always use specified ObjectSpec when decoding
178178
responses from EPP server.
179179

@@ -283,5 +283,5 @@ License
283283
-------
284284

285285
php-epp2 is released under the GPLv3 License. See the bundled
286-
[LICENSE](https://github.com/AfriCC/php-epp2/blob/master/LICENSE) file for
286+
[LICENSE](https://github.com/AfriCC/php-epp2/blob/main/LICENSE) file for
287287
details.

0 commit comments

Comments
 (0)