Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

Commit

Permalink
Add ci (#3)
Browse files Browse the repository at this point in the history
* Add workflow ci

* Update ci

* Fix ci file

* Update ci and composer.json

* Change update phpunit

Co-authored-by: stanislav.shupilkin <stanislav.shupilkin@lamoda.ru>
  • Loading branch information
Smolevich and stanislav.shupilkin authored Nov 17, 2021
1 parent 8432ed7 commit 868def8
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: PHP Composer

on: [push, pull_request]

jobs:
build:
name: Build for ${{ matrix.php-version }}
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [7.1, 7.2, 7.3, 7.4, 8.0]
steps:
- uses: actions/checkout@v2

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

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

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Update phpunit
if: startsWith(matrix.php, '7.1')
run: |
composer update --prefer-lowest
- name: Run test suite
run: vendor/bin/phpunit
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"description": "Configuration wrapper for redis-sentinel or plain redis",
"type": "library",
"require": {
"php": "^7.1",
"php": ">=7.1 | >=8.0",
"jamescauwelier/psredis": "^1.1"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.14",
"phpunit/phpunit": "^7.5"
"phpunit/phpunit": "^7.0 | ^9.0"
},
"license": "MIT",
"authors": [
Expand Down

0 comments on commit 868def8

Please sign in to comment.