Skip to content

feature: initial PSR-6 cache implementation #183

feature: initial PSR-6 cache implementation

feature: initial PSR-6 cache implementation #183

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- php: "8.4"
stability: --prefer-stable
- php: "8.2"
stability: --prefer-lowest
env:
PHP_VERSION: ${{ matrix.php }}
DEPS_STRATEGY: ${{ matrix.stability }}
name: PHP${{ matrix.php }} ${{ matrix.stability }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: masesgroup/retrieve-changed-files@v3
id: files
continue-on-error: true
- name: Setup spellcheker dependencies
run: make pull
- name: Define folders which changes within requires docker build step
run: echo "FILES_REQUIRING_DOCKER_BUILD=php/Dockerfile" >> $GITHUB_ENV
- name: Build docker images
run: make build
if: contains(steps.files.outputs.all, env.FILES_REQUIRING_DOCKER_BUILD)
- name: Login to Docker Hub
uses: docker/login-action@v3
if: contains(steps.files.outputs.all, env.FILES_REQUIRING_DOCKER_BUILD)
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Push docker image
run: make push
if: contains(steps.files.outputs.all, env.FILES_REQUIRING_DOCKER_BUILD)
- name: Run tests
run: |
export WITH_COVERAGE=$(if [[ ("${{ matrix.php }}" = "8.4") && ("${{ matrix.stability }}" = "--prefer-stable") ]]; then echo "true"; else echo "false"; fi)
echo "WITH_COVERAGE=${WITH_COVERAGE}" >> $GITHUB_ENV
make vendor
make tests
- name: Run examples
run: make examples-test
- uses: codecov/codecov-action@v4
if: env.WITH_COVERAGE == 'true'
with:
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}