Skip to content

[RELEASE] 3.0.0

[RELEASE] 3.0.0 #17

Workflow file for this run

name: BUILD
on:
push:
branches: [ main ]
tags:
- "**"
pull_request:
branches: [ main ]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
PHP: [ '7.4', '8.0', '8.1', '8.2', '8.3' ]
name: On PHP ${{ matrix.PHP }}
steps:
# Workaround for issue with actions/checkout "wrong PR commit checkout":
# See:
# ** https://github.com/actions/checkout/issues/299#issuecomment-677674415
# ** https://github.com/actions/checkout/issues/1359#issuecomment-1631503791
- name: Checkout current state of Pull Request
if: github.event_name == 'pull_request'
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout current state of Branch
if: github.event_name == 'push'
uses: actions/checkout@v3
# End: Workaround for issue with actions/checkout...
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.PHP }}
coverage: pcov
tools: composer:v2
- name: Tests setup
run: |
composer tests:setup
- name: Unit Tests
run: |
composer tests:unit -- --coverage-text
publish:
name: Publish PHAR file on Release
needs: tests
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Build PHAR
- name: Build PHAR
run: |
composer build:phar
- name: Upload PHAR on release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
.Build/bin/php-solr-explain.phar