Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to github actions #3

Merged
merged 3 commits into from
May 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .coveralls.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/bc_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: BC Check
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
bc_check:
name: Backwards Compatibility Check
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check for BC breaks
uses: docker://nyholm/roave-bc-check-ga
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
96 changes: 96 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
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']
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 (Coveralls)
run: php php-coveralls.phar -v
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tests-32bit:
name: Test 32 bit php
runs-on: ubuntu-latest
container: shivammathur/node:latest-i386
steps:
- name: Install PHP
run: |
spc -U
spc --php-version "7.4" --coverage "xdebug"
- name: Checkout Code
run: |
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY .
[ -n "$GITHUB_HEAD_REF" ] && git checkout $GITHUB_HEAD_REF || git checkout $GITHUB_SHA
- name: Install Dependencies
run: composer install
- name: Tests
run: composer phpunit
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
},
"scripts": {
"fixer": "php-cs-fixer fix src --verbose",
"phpstan": "phpstan analyse --level=max src"
"phpstan": "phpstan analyse --level=max src",
"phpunit": "phpunit"
}
}
4 changes: 4 additions & 0 deletions tests/CzechIbanAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ public function testAccountsWithoutPrefix()
'acc' => '500114004',
'bank' => '2700',
],
'CZ14 0100 0000 0029 0197 2682' => [
'acc' => '2901972682',
'bank' => '0100',
],
];

foreach ($accounts as $iban => $accountData) {
Expand Down