Skip to content

Commit

Permalink
Update php.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cliffordvickrey committed Oct 10, 2023
1 parent 8a353b5 commit aa94e87
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
name: Build library

on: [push]

# GitHub Action for Build
name: Testing Crosstabs
on: [push, pull_request]
jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
php-version:
- "8.2"

operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ['8.2']
runs-on: ${{ matrix.operating-system }}
steps:
- uses: actions/checkout@v3

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run test suite
run: composer run-script test

- name: Run PHPStan
run: composer run-script analyse

- name: Run Psalm
run: composer run-script psalm
- name: Checkout
uses: actions/checkout@v4

# Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: bcmath, intl
coverage: xdebug

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

- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader

- name: Test with phpunit
run: composer run-script test

0 comments on commit aa94e87

Please sign in to comment.