Skip to content

Commit

Permalink
Merge pull request #81 from php-http/cleanup-ci
Browse files Browse the repository at this point in the history
simplify ci
  • Loading branch information
dbu committed Apr 28, 2023
2 parents 6b35f84 + 03c63a4 commit f7352c0
Showing 1 changed file with 2 additions and 35 deletions.
37 changes: 2 additions & 35 deletions .github/workflows/Build-Test.yml
@@ -1,11 +1,10 @@
name: Tests

# Run this workflow every time a new commit pushed to your repository
on:
push:
branches:
- '*.x'
pull_request:
pull_request:

jobs:
tests:
Expand Down Expand Up @@ -34,45 +33,13 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}

- name: Cache PHP Extensions
uses: actions/cache@v2
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}

- name: Cache Composer Dependencies
uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: dependencies-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.extensions }}
coverage: xdebug
tools: pecl, composer

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
tools: 'composer:v2, pecl'

- name: Install Composer dependencies
run: composer update ${{ matrix.COMPOSER_FLAGS }} --no-interaction
Expand Down

0 comments on commit f7352c0

Please sign in to comment.