Skip to content

Commit

Permalink
Merge pull request #223 from DanielBadura/automatic-phar-build
Browse files Browse the repository at this point in the history
Test automatic phar creation process
  • Loading branch information
Ocramius committed Nov 27, 2020
2 parents 8f52133 + 9616a1e commit 8d6324f
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/phar-creation.yml
@@ -0,0 +1,63 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Building Require-Checker phar"

on:
pull_request:

jobs:
build:
name: "Building Require-Checker phar"

runs-on: ${{ matrix.operating-system }}

strategy:
matrix:
dependencies:
- "locked"
php-version:
- "7.4"
operating-system:
- "ubuntu-latest"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
tools: "phing"
coverage: "none"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1, phar.readonly=0

- name: "Cache dependencies"
uses: "actions/cache@v2"
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress --no-suggest"

- name: "Install locked dependencies"
if: ${{ matrix.dependencies == 'locked' }}
run: "composer install --no-interaction --no-progress --no-suggest"

- name: "build via phing"
run: "phing"

- name: "Upload phar file artifact"
uses: actions/upload-artifact@v2
with:
name: composer-require-checker.phar
path: build/composer-require-checker.phar

0 comments on commit 8d6324f

Please sign in to comment.