Skip to content

Commit

Permalink
Merge pull request #56 from DavidePastore/improvement/use-gh-actions-…
Browse files Browse the repository at this point in the history
…instead-of-travis-ci

Use GitHub Actions instead of Travis CI
  • Loading branch information
DavidePastore committed May 29, 2021
2 parents 9b33ca5 + 6f878e5 commit c61f5cc
Show file tree
Hide file tree
Showing 6 changed files with 848 additions and 46 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Continuous Integration

on: [push, pull_request]

jobs:
quality:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
php-version: ['7.3', '7.4']
node-version: [10.x, 11.x, 12.x, 13.x]
name: PHP ${{ matrix.php-version }} | Node ${{ matrix.node-version }} Test on ${{ matrix.operating-system }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}

- name: Check PHP Version
run: php -v

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

- name: PHP Unit tests
run: |
vendor/bin/phpunit --testsuite travis-ci
vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install NPM dependencies
run: npm install

- name: Compile assets
run: npm run dev

- name: Upload code coverage data
run: php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# codice-fiscale-rest

[![Latest version][ico-version]][link-packagist]
[![Build Status][ico-travis]][link-travis]
[![Build Status][ico-github-actions]][link-github-actions]
[![Coverage Status][ico-scrutinizer]][link-scrutinizer]
[![Quality Score][ico-code-quality]][link-code-quality]
[![Total Downloads][ico-downloads]][link-downloads]
[![PSR2 Conformance][ico-styleci]][link-styleci]

A simple codice fiscale rest website based on [Silex](http://silex.sensiolabs.org/).
A simple codice fiscale rest website based on [Symfony](https://symfony.com/).


Installation
Expand All @@ -19,6 +19,12 @@ Installation
npm install
```

### Compile assets

``` bash
npm run dev
```


### Install dependencies from composer.json

Expand All @@ -30,14 +36,12 @@ composer install
Launch
------

To launch the application with the default port (`8080`), you can use the following command:
To launch the application, you can use the following command:

``` bash
composer start
symfony server:start
```

or alternatively you can edit the `start` script (under the `scripts` property) in the `composer.json` file, choosing the port that you prefer to use.


Test
----
Expand All @@ -55,14 +59,14 @@ If you have issues, just open one [here](https://github.com/DavidePastore/codice


[ico-version]: https://img.shields.io/packagist/v/DavidePastore/codice-fiscale-rest.svg?style=flat-square
[ico-travis]: https://travis-ci.org/DavidePastore/codice-fiscale-rest.svg?branch=master
[ico-github-actions]: https://github.com/DavidePastore/codice-fiscale-rest/workflows/Continuous%20Integration/badge.svg?branch=master
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/DavidePastore/codice-fiscale-rest.svg?style=flat-square
[ico-code-quality]: https://img.shields.io/scrutinizer/g/davidepastore/codice-fiscale-rest.svg?style=flat-square
[ico-downloads]: https://img.shields.io/packagist/dt/DavidePastore/codice-fiscale-rest.svg?style=flat-square
[ico-styleci]: https://styleci.io/repos/47505745/shield

[link-packagist]: https://packagist.org/packages/DavidePastore/codice-fiscale-rest
[link-travis]: https://travis-ci.org/DavidePastore/codice-fiscale-rest
[link-github-actions]: https://github.com/DavidePastore/codice-fiscale-rest/actions?query=workflow%3A%22Continuous+Integration%22
[link-scrutinizer]: https://scrutinizer-ci.com/g/DavidePastore/codice-fiscale-rest/code-structure
[link-code-quality]: https://scrutinizer-ci.com/g/DavidePastore/codice-fiscale-rest
[link-downloads]: https://packagist.org/packages/DavidePastore/codice-fiscale-rest
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "davidepastore/codice-fiscale-rest",
"description": "A simple codice fiscale rest website based on Silex.",
"description": "A simple codice fiscale rest website based on Symfony.",
"keywords": ["codice","fiscale","rest","symfony", "tax", "code", "italian", "italy", "php"],
"authors": [
{
Expand Down Expand Up @@ -32,6 +32,7 @@
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"scrutinizer/ocular": "^1.8",
"symfony/browser-kit": "^5.2",
"symfony/css-selector": "^5.2",
"symfony/phpunit-bridge": "^5.2"
Expand Down
Loading

0 comments on commit c61f5cc

Please sign in to comment.