diff options
Diffstat (limited to '.github/workflows/test.yaml')
| -rw-r--r-- | .github/workflows/test.yaml | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index dc77653..6ab22a9 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,17 +1,39 @@ -name: Test +name: Lint & Test on: push: - branches: - - main + branches: [main] + pull_request: + branches: [main] jobs: test: - name: Test + name: Lint & Test runs-on: ubuntu-latest + strategy: + matrix: + php-versions: ['8.4', '8.5'] steps: - uses: actions/checkout@v4 - - uses: php-actions/composer@v6 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + + - name: Get composer cache directory + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - name: Cache dependencies + uses: actions/cache@v4 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install dependencies + run: composer install --prefer-dist - name: Run ECS run: composer ecs |
