Skip to content

Commit 7d91f5a

Browse files
authored
Merge pull request #8 from WebFiori/github-actions
Remove Travis CI and Add GitHub Actions
2 parents 45bb11b + d624637 commit 7d91f5a

4 files changed

Lines changed: 83 additions & 22 deletions

File tree

.github/workflows/php7.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build PHP 7
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: true
14+
matrix:
15+
os: [ ubuntu-latest ]
16+
php: [7.1, 7.0, 5.6]
17+
18+
name: PHP${{matrix.php}} - ${{matrix.os}}
19+
20+
steps:
21+
- name: Clone Repo
22+
uses: actions/checkout@v1
23+
24+
- name: Setup PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php }}
28+
extensions: mysqli, mbstring
29+
tools: phpunit:5.7.27, composer
30+
31+
- name: Install Dependencies
32+
run: composer install --prefer-source --no-interaction --no-dev
33+
34+
- name: Execute Tests
35+
run: phpunit

.github/workflows/php8.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build PHP 7,8
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: true
14+
matrix:
15+
os: [ ubuntu-latest ]
16+
php: [ 8.0, 7.4, 7.3, 7.2]
17+
18+
name: PHP${{matrix.php}} - ${{matrix.os}}
19+
20+
steps:
21+
- name: Clone Repo
22+
uses: actions/checkout@v1
23+
24+
- name: Setup PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php }}
28+
extensions: mysqli, mbstring
29+
tools: phpunit:8.5.13, composer
30+
31+
- name: Install Dependencies
32+
run: composer install --prefer-source --no-interaction --no-dev
33+
34+
- name: Execute Tests
35+
run: phpunit
36+
37+
- name: CodeCov
38+
uses: codecov/codecov-action@v1
39+
40+
- name: SonarCloud
41+
uses: SonarSource/sonarcloud-github-action@master
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
45+
46+

.travis.yml

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

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ A simple library for creating RESTful web APIs in aadition to providing the deve
33
It includes inputs feltering and data validation in addion to creating user-defined inputs filters.
44

55
<p align="center">
6-
<a href="https://travis-ci.com/github/WebFiori/http">
7-
<img src="https://travis-ci.com/WebFiori/http.svg?branch=master">
6+
<a href="https://github.com/WebFiori/http/actions">
7+
<img src="https://github.com/WebFiori/http/workflows/Build%20PHP%207,8/badge.svg?branch=master">
88
</a>
99
<a href="https://codecov.io/gh/WebFiori/http">
1010
<img src="https://codecov.io/gh/WebFiori/http/branch/master/graph/badge.svg" />

0 commit comments

Comments
 (0)