Skip to content

Build

Build #925

Workflow file for this run

name: Build
on:
push:
branches: ['1.9']
pull_request:
release:
types: [created]
schedule:
- cron: '0 4 * * *'
jobs:
tests:
runs-on: ubuntu-latest
name: Build and test
strategy:
matrix:
php: ['8.1', '8.2']
deps: [high]
include:
- php: '8.2'
deps: low
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
ini-values: "phar.readonly=0"
coverage: none
- name: Test & package
if: matrix.deps == 'high'
run: make update test package test-package
- name: Test & package (low)
if: matrix.deps == 'low'
run: make update-min test-min package test-package
- name: Upload the phar
uses: actions/upload-artifact@v1
if: matrix.php == '8.1' && matrix.deps == 'high'
with:
name: zalas-phpunit-doubles-extension.phar
path: build/zalas-phpunit-doubles-extension.phar
publish-phars:
runs-on: ubuntu-latest
name: Publish PHARs
needs: tests
if: github.event_name == 'release'
steps:
- name: Download the phar
uses: actions/download-artifact@v1
with:
name: zalas-phpunit-doubles-extension.phar
path: .
- name: Release the phar
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./zalas-phpunit-doubles-extension.phar
asset_name: zalas-phpunit-doubles-extension.phar
asset_content_type: application/zip