Merge pull request #137 from ringcentral/vendorPatch #48
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Pipeline | |
on: [push, pull_request] | |
## Github Actions for PHP SDK | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: [8.1, 8.0, 7.4] | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Use PHP ${{ matrix.php-version }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
coverage: pcov | |
tools: composer:v2 | |
ini-values: phar.readonly=0 | |
- name: Composer update | |
run: composer update | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-interaction | |
- name: Run tests | |
run: composer test | |
- name: Build phar | |
run: composer phar | |
- name: Upload coverage results to Coveralls | |
if: matrix.php-version == '7.4' | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
composer global require php-coveralls/php-coveralls | |
php-coveralls --coverage_clover=dist/coverage/clover.xml -v | |
- name: Release | |
if: matrix.php-version == '7.4' && startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ./dist/ringcentral.phar | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |