diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index 41492ae..0000000 --- a/.coveralls.yml +++ /dev/null @@ -1,3 +0,0 @@ -service_name: travis-ci -coverage_clover: ./tmp/clover.xml -json_path: ./tmp/coverage.json \ No newline at end of file diff --git a/.github/workflows/bc_check.yaml b/.github/workflows/bc_check.yaml new file mode 100644 index 0000000..4f5bcec --- /dev/null +++ b/.github/workflows/bc_check.yaml @@ -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 diff --git a/.github/workflows/create_release.yaml b/.github/workflows/create_release.yaml new file mode 100644 index 0000000..5030f84 --- /dev/null +++ b/.github/workflows/create_release.yaml @@ -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 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..5f5fc4f --- /dev/null +++ b/.github/workflows/test.yaml @@ -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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4c833c9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: php -dist: xenial - -matrix: - include: - - php: 7.3 - - php: 7.4 - env: - - USE_PHPSTAN="1" - - USE_FIXER="1" - - php: 8.0 - -cache: - directories: - - $HOME/.cache/composer/files - -install: composer install $COMPOSER_FLAGS - -script: - - vendor/bin/phpunit $PHPUNIT_FLAGS - - '[[ $USE_FIXER != "1" ]] || vendor/bin/php-cs-fixer fix src/ --dry-run --verbose' - - '[[ $USE_PHPSTAN != "1" ]] || composer phpstan' - -after_script: - - '[[ $USE_COVERAGE != "1" ]] || ./vendor/bin/php-coveralls --verbose' - -branches: - only: - - master diff --git a/composer.json b/composer.json index 8154c31..9bd6ed8 100644 --- a/composer.json +++ b/composer.json @@ -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" } } diff --git a/tests/CzechIbanAdapterTest.php b/tests/CzechIbanAdapterTest.php index d40b550..ae18419 100644 --- a/tests/CzechIbanAdapterTest.php +++ b/tests/CzechIbanAdapterTest.php @@ -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) {