Skip to content

Commit fa72c5e

Browse files
committed
Switch to GA worflow for CI
1 parent b7e2384 commit fa72c5e

File tree

4 files changed

+77
-43
lines changed

4 files changed

+77
-43
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ phpunit.xml export-ignore
77
tests export-ignore
88
.phpstan.neon export-ignore
99
.psalm.xml export-ignore
10+
.github export-ignore

.github/workflows/ci.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
testsuite:
7+
runs-on: ubuntu-18.04
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
php-version: ['7.4', '8.0']
12+
composer-opts: ['']
13+
include:
14+
- php-version: '7.2'
15+
composer-opts: '--prefer-lowest'
16+
17+
steps:
18+
- uses: actions/checkout@v1
19+
with:
20+
fetch-depth: 1
21+
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: ${{ matrix.php-version }}
26+
extension-csv: mbstring, intl
27+
coverage: pcov
28+
29+
- name: Composer install
30+
run: |
31+
composer update ${{ matrix.composer-opts }}
32+
33+
- name: Run PHPUnit
34+
run: |
35+
if [[ ${{ matrix.php-version }} == '7.4' ]]; then
36+
vendor/bin/phpunit --coverage-clover=coverage.xml
37+
else
38+
vendor/bin/phpunit
39+
fi
40+
41+
- name: Code Coverage Report
42+
if: matrix.php-version == '7.4'
43+
uses: codecov/codecov-action@v1
44+
45+
cs-stan:
46+
name: Coding Standard & Static Analysis
47+
runs-on: ubuntu-18.04
48+
49+
steps:
50+
- uses: actions/checkout@v1
51+
with:
52+
fetch-depth: 1
53+
54+
- name: Setup PHP
55+
uses: shivammathur/setup-php@v2
56+
with:
57+
php-version: '7.4'
58+
extension-csv: mbstring, intl
59+
coverage: none
60+
tools: cs2pr, psalm, phpstan
61+
62+
- name: Composer Install
63+
run: composer require cakephp/cakephp-codesniffer:^4.1
64+
65+
- name: Run phpcs
66+
run: vendor/bin/phpcs --report=checkstyle -q --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/ | cs2pr
67+
68+
- name: Run psalm
69+
if: success() || failure()
70+
run: psalm --output-format=github
71+
72+
- name: Run phpstan
73+
if: success() || failure()
74+
run: phpstan analyse

.travis.yml

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

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# CakePHP JWT Authenticate plugin
22

3-
[![Build Status](https://img.shields.io/travis/ADmad/cakephp-jwt-auth/master.svg?style=flat-square)](https://travis-ci.org/ADmad/cakephp-jwt-auth)
4-
[![Coverage](https://img.shields.io/codecov/c/github/ADmad/cakephp-jwt-auth.svg?style=flat-square)](https://codecov.io/github/ADmad/cakephp-jwt-auth)
3+
[![Build Status](https://img.shields.io/github/workflow/status/ADmad/cakephp-jwt-auth/CI/master?style=flat-square)](https://github.com/ADmad/cakephp-jwt-auth/actions?query=workflow%3ACI+branch%3Amaster)
4+
[![Coverage Status](https://img.shields.io/codecov/c/github/ADmad/cakephp-jwt-auth.svg?style=flat-square)](https://codecov.io/github/ADmad/cakephp-jwt-auth)
55
[![Total Downloads](https://img.shields.io/packagist/dt/ADmad/cakephp-jwt-auth.svg?style=flat-square)](https://packagist.org/packages/ADmad/cakephp-jwt-auth)
66
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE.txt)
77

0 commit comments

Comments
 (0)