Skip to content

Commit

Permalink
Merge pull request #54 from visto9259/master
Browse files Browse the repository at this point in the history
Transition from TravisI to GitHub actions for CI.
  • Loading branch information
visto9259 authored Mar 12, 2024
2 parents 341a0bd + 51d0d1f commit 3fedbab
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 87 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build

on:
push:
pull_request:

env:
COMPOSER_ARGS: '--no-progress'

jobs:
build:
strategy:
matrix:
php_version: ['8.1', '8.2', '8.3']
deps: ['--prefer-lowest --prefer-dist', '']
include:
- code-coverage: 'yes'
php_version: '8.2'
deps: ''
runs-on: ubuntu-latest

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

- name: Show PHP version
run: php -v

- uses: actions/checkout@v4
name: Checkout branch

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

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{matrix.php_version}}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php--${{matrix.php_version}}-
- name: Install/update dependencies
run: composer update ${{matrix.deps}} $COMPOSER_ARGS

- name: Run PHPUnit test suite
if: ${{ matrix.code-coverage != 'yes' }}
run: composer run-script test

- name: Run PHPUnit test suite with coverage
if: ${{ matrix.code-coverage == 'yes' }}
run: composer run-script test-coverage

- name: Upload coverage results to Coverall
if: ${{ matrix.code-coverage == 'yes' }}
uses: coverallsapp/github-action@v2


84 changes: 0 additions & 84 deletions .travis.yml

This file was deleted.

7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
LmcUser
=======
[![Build Status](https://travis-ci.com/LM-Commons/LmcUser.svg?branch=master)](https://travis-ci.com/LM-Commons/LmcUser)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/LM-Commons/LmcUser/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/LM-Commons/LmcUser/?branch=master)
[![Latest Stable Version](http://poser.pugx.org/lm-commons/lmc-user/v)](https://packagist.org/packages/lm-commons/lmc-user)
[![Total Downloads](http://poser.pugx.org/lm-commons/lmc-user/downloads)](https://packagist.org/packages/lm-commons/lmc-user)
[![Build](https://github.com/visto9259/LmcUser/actions/workflows/build_test.yml/badge.svg)](https://github.com/visto9259/LmcUser/actions/workflows/build_test.yml)
[![Gitter](https://badges.gitter.im/LM-Commons/community.svg)](https://gitter.im/LM-Commons/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

Based on ZfcUser by Evan Coury and the ZF-Commons team
Expand Down Expand Up @@ -43,7 +44,7 @@ Installation

1. Add this project in your composer.json:

```json
```
"require": {
"lm-commons/lmc-user": "^3.1"
}
Expand Down

0 comments on commit 3fedbab

Please sign in to comment.