Skip to content

Commit d89588f

Browse files
committed
Added support for Github actions
- Added php.yml file - Removed .travis.yml file - Updated badges in README.md - Added test script to composet.json
1 parent 718b1cb commit d89588f

File tree

4 files changed

+44
-60
lines changed

4 files changed

+44
-60
lines changed

.github/workflows/php.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: PHP Composer
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, windows-latest, macos-latest]
16+
php: [7.3, 7.4, 8.0]
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- name: Validate composer.json and composer.lock
22+
run: composer validate --strict
23+
24+
- name: Cache Composer packages
25+
id: composer-cache
26+
uses: actions/cache@v2
27+
with:
28+
path: vendor
29+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
30+
restore-keys: |
31+
${{ runner.os }}-php-
32+
33+
- name: Install dependencies
34+
run: composer install --prefer-dist --no-progress
35+
36+
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
37+
# Docs: https://getcomposer.org/doc/articles/scripts.md
38+
39+
- name: Run test suite
40+
run: composer run test

.travis.yml

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

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# PHP GraphQL OQM
2-
[![Build Status](https://travis-ci.org/mghoneimy/php-graphql-oqm.svg?branch=master)](https://travis-ci.org/mghoneimy/php-graphql-oqm)
3-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/3146530837f64435a79810afd81b1945)](https://www.codacy.com/app/mghoneimy/php-graphql-oqm?utm_source=github.com&utm_medium=referral&utm_content=mghoneimy/php-graphql-oqm&utm_campaign=Badge_Grade)
4-
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/3146530837f64435a79810afd81b1945)](https://www.codacy.com/app/mghoneimy/php-graphql-oqm?utm_source=github.com&utm_medium=referral&utm_content=mghoneimy/php-graphql-oqm&utm_campaign=Badge_Coverage)
2+
![Build Status](https://github.com/mghoneimy/php-graphql-oqm/actions/workflows/php.yml/badge.svg)
53

64
This package utilizes the introspection feature of GraphQL APIs to generate a set of classes that map to the structure
75
of the API schema. The generated classes can then be used in a very simple and intuitive way to query the API server.

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,8 @@
4141
"phpunit/phpunit": "^7.5|^8.0",
4242
"codacy/coverage": "^1.4",
4343
"ext-json": "*"
44+
},
45+
"scripts": {
46+
"test": "phpunit tests/ --whitelist src/ --coverage-clover build/coverage/xml"
4447
}
4548
}

0 commit comments

Comments
 (0)