Skip to content

CI

CI #70

Workflow file for this run

name: CI
on:
push:
pull_request:
schedule:
- cron: '0 0 1,16 * *'
env:
REDIS_HOST1: localhost:16379
REDIS_HOST2: 127.0.0.1:16379
REDIS_CLUSTER_HOSTS: localhost:7000 localhost:7001 localhost:7002 localhost:7003 localhost:7004 localhost:7005
REDIS_SENTINEL_HOST: 'localhost:26379'
REDIS_SENTINEL_SERVICE: redis_sentinel
jobs:
tests:
name: PHP ${{ matrix.php }} - ${{ matrix.deps }}
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.0, 8.1, 8.2]
deps: [highest]
include:
- php: 8.0
deps: lowest
services:
redis:
image: redis:6.0.0
ports:
- 16379:6379
redis-cluster:
image: grokzen/redis-cluster:latest
ports:
- 7000:7000
- 7001:7001
- 7002:7002
- 7003:7003
- 7004:7004
- 7005:7005
- 7006:7006
env:
STANDALONE: 1
redis-sentinel:
image: bitnami/redis-sentinel:6.0
ports:
- 26379:26379
env:
REDIS_MASTER_HOST: redis
REDIS_MASTER_SET: redis_sentinel
REDIS_SENTINEL_QUORUM: 1
steps:
- uses: zenstruck/.github@php-test-symfony
with:
php: ${{ matrix.php }}
deps: ${{ matrix.deps }}
code-coverage:
name: Code Coverage
runs-on: ubuntu-latest
services:
redis:
image: redis:6.0.0
ports:
- 16379:6379
redis-cluster:
image: grokzen/redis-cluster:latest
ports:
- 7000:7000
- 7001:7001
- 7002:7002
- 7003:7003
- 7004:7004
- 7005:7005
- 7006:7006
env:
STANDALONE: 1
redis-sentinel:
image: bitnami/redis-sentinel:6.0
ports:
- 26379:26379
env:
REDIS_MASTER_HOST: redis
REDIS_MASTER_SET: redis_sentinel
REDIS_SENTINEL_QUORUM: 1
steps:
- uses: zenstruck/.github@php-coverage-codecov
with:
php: 8.1
composer-validate:
uses: zenstruck/.github/.github/workflows/php-composer-validate.yml@main
sca:
uses: zenstruck/.github/.github/workflows/php-stan.yml@main
fixcs:
name: Run php-cs-fixer
needs: sync-with-template
if: (github.event_name == 'push' || github.event_name == 'schedule') && !startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: zenstruck/.github@php-cs-fixer
with:
php: 8
key: ${{ secrets.GPG_PRIVATE_KEY }}
token: ${{ secrets.COMPOSER_TOKEN }}
sync-with-template:
name: Sync meta files
if: (github.event_name == 'push' || github.event_name == 'schedule') && !startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: zenstruck/.github@sync-with-template
with:
key: ${{ secrets.GPG_PRIVATE_KEY }}
token: ${{ secrets.COMPOSER_TOKEN }}