Skip to content

Support PHP 8.3

Support PHP 8.3 #116

Workflow file for this run

name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
- issue/*
- dev/*
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
redis-version:
- '6'
- '7'
php-version:
- php: '7.4'
phpunit: 9.3.9
- php: '8.0'
phpunit: 9.3.9
- php: '8.1'
phpunit: 9.6.19
- php: '8.2'
phpunit: 9.6.19
- php: '8.3'
phpunit: 9.6.19
steps:
- uses: actions/checkout@v2
- name: Set PHP_VERSION
run: echo "PHP_VERSION=${{matrix.php-version.php}}" >> $GITHUB_ENV
- name: Set PHPUNIT_VERSION
run: echo "PHPUNIT_VERSION=${{matrix.php-version.phpunit}}" >> $GITHUB_ENV
- name: Set REDIS_VERSION
run: echo "REDIS_VERSION=${{matrix.redis-version}}" >> $GITHUB_ENV
- name: Build docker image
run: docker-compose -f test/docker-compose.yml build
- name: Run PHPUnit inside Docker Compose
run: docker-compose -f test/docker-compose.yml run php
- name: Create package
run: script/package
- uses: actions/upload-artifact@v2
with:
name: artifact
path: work/wp-redis-patch.zip
release:
needs: build
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
- name: Show artifacts
run: ls -laR ./
- name: Generate build number
uses: einaregilsson/build-number@v3
with:
token: ${{secrets.GITHUB_TOKEN}}
prefix: build_number_generator
- name: Print new build number
run: echo "Build number is $BUILD_NUMBER"
- id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
tag_name: build-${{env.BUILD_NUMBER}}
release_name: Build ${{env.BUILD_NUMBER}}
draft: false
prerelease: false
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
upload_url: ${{steps.create_release.outputs.upload_url}}
asset_path: ./wp-redis-patch.zip
asset_name: wp-redis-patch.build-${{env.BUILD_NUMBER}}.zip
asset_content_type: application/zip