Skip to content

Commit

Permalink
improve github ci
Browse files Browse the repository at this point in the history
  • Loading branch information
lhapaipai committed Nov 2, 2023
1 parent 66336cb commit aea9ce7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
name: CI

on: [ push, pull_request ]
on:
push:
branches: ['main']
pull_request:

jobs:
ci:
name: CI
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
php-versions: [ '7.4', '8.0', '8.1', '8.2' ]

Expand All @@ -23,10 +27,12 @@ jobs:
run: find -L . -path ./vendor -prune -o -type f -name '*.php' -print0 | xargs -0 -n 1 -P $(nproc) php -l

- name: Get composer cache directory
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer
# https://github.com/shivammathur/setup-php/tree/v2/#cache-composer-dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
Expand Down

0 comments on commit aea9ce7

Please sign in to comment.