Build #2128
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: Build | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
release: | |
types: [created] | |
schedule: | |
- cron: '0 4 * * *' | |
env: | |
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
name: Build and test | |
strategy: | |
matrix: | |
php: [8.0, 8.1, 8.2] | |
deps: [high] | |
include: | |
- php: 8.0 | |
deps: low | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "${{ matrix.php }}" | |
tools: composer | |
ini-values: "phar.readonly=0" | |
coverage: none | |
- if: matrix.deps == 'high' | |
run: make update test package package-devkit | |
- if: matrix.deps == 'low' | |
run: make update-min test-min | |
- uses: actions/upload-artifact@v1 | |
if: matrix.php == '8.0' && matrix.deps == 'high' | |
with: | |
name: toolbox.phar | |
path: build/toolbox.phar | |
- uses: actions/upload-artifact@v1 | |
if: matrix.php == '8.0' && matrix.deps == 'high' | |
with: | |
name: devkit.phar | |
path: build/devkit.phar | |
integration-tests: | |
runs-on: ubuntu-latest | |
name: Run integration tests | |
needs: tests | |
strategy: | |
matrix: | |
php: [8.0, 8.1, 8.2] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "${{ matrix.php }}" | |
tools: composer | |
ini-values: "phar.readonly=0" | |
coverage: none | |
extensions: bz2, zip | |
- uses: actions/download-artifact@v1 | |
with: | |
name: toolbox.phar | |
path: build/ | |
- run: make test-integration | |
env: | |
GITHUB_AUTH_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
publish-phars: | |
runs-on: ubuntu-latest | |
name: Publish PHARs | |
needs: tests | |
if: github.event_name == 'release' | |
steps: | |
- uses: actions/download-artifact@v1 | |
with: | |
name: toolbox.phar | |
path: . | |
- uses: actions/download-artifact@v1 | |
with: | |
name: devkit.phar | |
path: . | |
- name: Upload toolbox.phar | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./toolbox.phar | |
asset_name: toolbox.phar | |
asset_content_type: application/zip | |
- name: Upload devkit.phar | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./devkit.phar | |
asset_name: devkit.phar | |
asset_content_type: application/zip |