Skip to content

Commit

Permalink
[FRAM-13] Migrate to github action
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent4vx committed Jan 26, 2022
1 parent 75fe0ee commit a3bf751
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 26 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/php.yml
@@ -0,0 +1,80 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0']
name: PHP ${{ matrix.php-versions }}

steps:
- uses: actions/checkout@v2

- name: Set Timezone
uses: szenius/set-timezone@v1.0
with:
timezoneLinux: "Europe/Paris"

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: json
ini-values: date.timezone=Europe/Paris
- name: Check PHP Version
run: php -v

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Install dependencies
run: composer install --prefer-dist --no-progress

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

- name: Run test suite
run: composer run-script tests

analysis:
name: Analysis
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set Timezone
uses: szenius/set-timezone@v1.0
with:
timezoneLinux: "Europe/Paris"

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: json
ini-values: date.timezone=Europe/Paris

- name: Install Infection
run: composer global require infection/infection

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run type coverage
run: composer run-script psalm

- name: Run Infection
run: |
git fetch --depth=1 origin $GITHUB_BASE_REF
~/.composer/vendor/bin/infection --logger-github --git-diff-filter=AM --min-msi=90
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -2,7 +2,7 @@

Library for handle form, and request validation.

[![Build Status](https://travis-ci.org/b2pweb/bdf-form.svg?branch=master)](https://travis-ci.org/b2pweb/bdf-form)
[![build](https://github.com/b2pweb/bdf-form/actions/workflows/php.yml/badge.svg)](https://github.com/b2pweb/bdf-form/actions/workflows/php.yml)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/b2pweb/bdf-form/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/b2pweb/bdf-form/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/b2pweb/bdf-form/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/b2pweb/bdf-form/?branch=master)
[![Packagist Version](https://img.shields.io/packagist/v/b2pweb/bdf-form.svg)](https://packagist.org/packages/b2pweb/bdf-form)
Expand Down

0 comments on commit a3bf751

Please sign in to comment.