Skip to content

Commit

Permalink
switch to github actions (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
RikudouSage committed Apr 20, 2021
1 parent 44d7ffb commit 0d22a7f
Show file tree
Hide file tree
Showing 7 changed files with 129 additions and 42 deletions.
3 changes: 0 additions & 3 deletions .coveralls.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/bc_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: BC Check
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
bc_check:
name: Backwards Compatibility Check
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install BC checker
run: composer require --dev roave/backward-compatibility-check
- name: Check for BC breaks
run: vendor/bin/roave-backward-compatibility-check
23 changes: 23 additions & 0 deletions .github/workflows/create_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Create Release

on:
push:
tags:
- v*
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Create a Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
79 changes: 79 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Tests
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
code_style:
name: Test code style
runs-on: ubuntu-latest
strategy:
matrix:
version: ['7.3', '7.4', '8.0']
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.version }}
- name: Checkout Code
uses: actions/checkout@v2
- name: Install Dependencies
run: composer install
- name: Test code style
run: composer fixer -- --dry-run
static_analysis:
name: Static analysis
runs-on: ubuntu-latest
strategy:
matrix:
version: ['7.3', '7.4', '8.0']
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.version }}
- name: Checkout Code
uses: actions/checkout@v2
- name: Install Dependencies
run: composer install
- name: Run static analysis
run: composer phpstan
tests:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
version: ['7.3', '7.4', '8.0']
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.version }}
- name: Checkout Code
uses: actions/checkout@v2
- name: Install Dependencies
run: composer install
- name: Run tests
run: composer phpunit
coverage:
name: Report Coverage
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Checkout Code
uses: actions/checkout@v2
- name: Install Dependencies
run: composer install
- name: Generate Coverage
run: composer phpunit -- --coverage-clover ./build/logs/clover.xml
- name: Download Coverage Client
run: wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.3/php-coveralls.phar
- name: Publish Coverage
run: php php-coveralls.phar -v
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# QR code payment (EU)

[![Build Status](https://img.shields.io/travis/com/RikudouSage/QrPaymentEU/master.svg)](https://travis-ci.com/RikudouSage/QrPaymentEU)
[![Tests](https://github.com/RikudouSage/QrPaymentEU/actions/workflows/test.yaml/badge.svg)](https://github.com/RikudouSage/QrPaymentEU/actions/workflows/test.yaml)
[![Coverage Status](https://img.shields.io/coveralls/github/RikudouSage/QrPaymentEU/master.svg)](https://coveralls.io/github/RikudouSage/QrPaymentEU?branch=master)
[![Download](https://img.shields.io/packagist/dt/rikudou/euqrpayment.svg)](https://packagist.org/packages/rikudou/euqrpayment)

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
},
"scripts": {
"fixer": "php-cs-fixer fix src --verbose",
"phpstan": "phpstan analyse --level=7 src"
"phpstan": "phpstan analyse --level=7 src",
"phpunit": "phpunit"
}
}

0 comments on commit 0d22a7f

Please sign in to comment.