Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Commit

Permalink
Merge pull request #32 from smartbooster/qa
Browse files Browse the repository at this point in the history
Setup Codecov.io + Matrix CI
  • Loading branch information
mathieu-ducrot authored May 18, 2021
2 parents ee7093c + fa3a114 commit 1cd8ca4
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 20 deletions.
42 changes: 25 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,43 @@ on:
jobs:
build_test_lastest:
runs-on: ubuntu-latest
name: Build and test on lastest php-fpm:builder
container: smartbooster/php-fpm:builder
name: Build and test on php-fpm:${{ matrix.php }}-builder
container: smartbooster/php-fpm:${{ matrix.php }}-builder
strategy:
matrix:
php: [ 7.3, 7.4 ]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install
run: composer install --prefer-dist
- name: Check PHP Version
run: php -v

- name: Qualimetry
run: make qa
# —— Composer 🧙‍️ —————————————————————————————————————————————————————————
- name: Validate composer.json and composer.lock
run: composer validate

- name: Phunit
run: make phpunit
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

build_test_7_3:
runs-on: ubuntu-latest
name: Build and test on php-fpm:7.3-builder
container: smartbooster/php-fpm:7.3-builder
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install
run: composer install --prefer-dist

- name: Qualimetry
run: make qa

- name: Phunit
run: make phpunit
- name: Phpunit
run: XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-clover coverage.xml --coverage-filter=src tests
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v1
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/vendor/
composer.lock
/build/
coverage.*
.php_cs.cache
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@

# ====================
# Docker
up:
docker-compose up

down:
docker-compose down

ps:
docker-compose ps

ssh:
docker exec -it --user=dev authenticationbundle-docker-php bash

# ====================
# Qualimetry rules

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
[![Total Downloads](https://poser.pugx.org/smartbooster/authentication-bundle/downloads)](https://packagist.org/packages/smartbooster/authentication-bundle)
[![License](https://poser.pugx.org/smartbooster/authentication-bundle/license)](https://packagist.org/packages/smartbooster/authentication-bundle)

[![Build Status](https://api.travis-ci.org/smartbooster/authentication-bundle.png?branch=master)](https://travis-ci.org/smartbooster/authentication-bundle)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/smartbooster/authentication-bundle/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/smartbooster/authentication-bundle/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/smartbooster/authentication-bundle/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/smartbooster/authentication-bundle/?branch=master)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/5b131f1ee0a34a999f85d991615bcb0c)](https://www.codacy.com/gh/smartbooster/authentication-bundle/dashboard?utm_source=github.com&utm_medium=referral&utm_content=smartbooster/authentication-bundle&utm_campaign=Badge_Grade)
[![codecov](https://codecov.io/gh/smartbooster/authentication-bundle/branch/master/graph/badge.svg)](https://codecov.io/gh/smartbooster/authentication-bundle)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/5b131f1ee0a34a999f85d991615bcb0c)](https://www.codacy.com/gh/smartbooster/authentication-bundle/dashboard?utm_source=github.com&utm_medium=referral&utm_content=smartbooster/authentication-bundle&utm_campaign=Badge_Grade)

## Installation

Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: '3'

services:
php:
container_name: authenticationbundle-docker-php
image: smartbooster/php-fpm:builder
ports:
- "9000:9000"
volumes:
- ./:/var/www
1 change: 0 additions & 1 deletion travis.php.ini

This file was deleted.

0 comments on commit 1cd8ca4

Please sign in to comment.