Skip to content

Commit

Permalink
Merge 5d584f7 into d377ad8
Browse files Browse the repository at this point in the history
  • Loading branch information
sanmai committed Oct 13, 2020
2 parents d377ad8 + 5d584f7 commit 5e17855
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 61 deletions.
46 changes: 0 additions & 46 deletions .github/workflows/cd.yaml

This file was deleted.

31 changes: 22 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Unit Testing
# yamllint disable rule:line-length
# yamllint disable rule:braces

name: Continuous Integration

on:
pull_request:
push:
branches:
branches:
- main

jobs:
Expand All @@ -14,12 +17,14 @@ jobs:
matrix:
php-version: ['7.3', '7.4']
dependencies: ['']
make-args: ['']
include:
- { php-version: '7.3', dependencies: '--prefer-lowest' }
- { php-version: '8.0', dependencies: '--ignore-platform-req=php' }
- { php-version: '7.3', make-args: 'PHPUNIT_GROUP=integration' }

continue-on-error: ${{ matrix.php-version == '8.0' }}
name: PHP ${{ matrix.php-version }} ${{ matrix.dependencies }}
name: PHP ${{ matrix.php-version }} ${{ matrix.dependencies }} ${{ matrix.make-args }}

steps:
- name: Checkout code
Expand All @@ -29,8 +34,7 @@ jobs:
uses: shivammathur/setup-php@v1
with:
php-version: ${{ matrix.php-version }}
extensions:
coverage: none
coverage: pcov
tools: composer:v2

- name: Cache dependencies
Expand All @@ -46,11 +50,20 @@ jobs:
run: |
composer update --prefer-dist --no-interaction --no-progress ${{ matrix.dependencies }}
- name: Execute tests
run: |
make ci-test
- name: Validate composer.json
run: |
composer validate --strict
composer normalize --diff --dry-run
- name: Execute tests
env:
SHIPANDCO_ACCESS_TOKEN: ${{ secrets.SHIPANDCO_ACCESS_TOKEN }}
run: |
make ci-test ${{ matrix.make-args }}
- name: Upload coverage report
continue-on-error: true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
php vendor/bin/php-coveralls -v
4 changes: 2 additions & 2 deletions .github/workflows/cs.yaml → .github/workflows/cs.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# yamllint disable rule:line-length

name: Code Style

on:
Expand All @@ -23,7 +25,6 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions:
tools: composer:v2

- name: Cache dependencies
Expand All @@ -42,4 +43,3 @@ jobs:
- name: Check code style
run: |
php vendor/bin/php-cs-fixer --using-cache=no --diff --dry-run --stop-on-violation --verbose fix
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ ci-cs: prerequisites
##############################################################

.PHONY: test
test: analyze phpunit composer-validate
test: analyze phpunit composer-validate yamllint

.PHONY: composer-validate
composer-validate: test-prerequisites
Expand Down Expand Up @@ -142,6 +142,10 @@ build/cache:
report-php-version:
# Using $(PHP)

.PHONY: yamllint
yamllint:
find .github/workflows/ -name \*.y*ml -print0 | xargs -n 1 -0 yamllint --no-warnings

##############################################################
# Quick development testing procedure #
##############################################################
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Ship&co API integration SDK

[![Latest Stable Version](https://poser.pugx.org/sanmai/shipandco-sdk/v/stable)](https://packagist.org/packages/sanmai/shipandco-sdk)
[![Build Status](https://travis-ci.com/sanmai/shipandco-sdk.svg?branch=master)](https://travis-ci.com/sanmai/shipandco-sdk)
[![Coverage Status](https://coveralls.io/repos/github/sanmai/shipandco-sdk/badge.svg?branch=master)](https://coveralls.io/github/sanmai/shipandco-sdk?branch=master)
[![Build Status](https://travis-ci.com/sanmai/shipandco-sdk.svg?branch=main)](https://travis-ci.com/sanmai/shipandco-sdk)
[![Coverage Status](https://coveralls.io/repos/github/sanmai/shipandco-sdk/badge.svg?branch=main)](https://coveralls.io/github/sanmai/shipandco-sdk?branch=main)

Features:

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"infection/infection": ">=0.16",
"laravel/framework": "^5.8",
"phan/phan": "^1 <1.3 || >1.3.0",
"php-coveralls/php-coveralls": "^2.1",
"php-coveralls/php-coveralls": "^2.4.1",
"phpstan/phpstan": ">=0.10",
"phpunit/phpunit": "^9.3",
"vimeo/psalm": ">=3.0.16"
Expand Down

0 comments on commit 5e17855

Please sign in to comment.