.github/workflows/ci.yml
name: Continuous integration
on:
push:
pull_request:
branches: [main]
types: [opened]
jobs:
ci:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, macos-latest]
php-versions: ["8.1"]
name: ๐ฆ php ${{ matrix.php-versions }} ๐ฅ๏ธ ${{ matrix.operating-system }}
steps:
- name: ๐ Checkout repo
uses: actions/checkout@v4
- name: ๐ Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: composer:v2
- name: ๐ฏ Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
- name: โ
Validate Composer files
run: composer validate
- name: ๐ Cache Composer packages
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 -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
yarn
- name: ๐๏ธ Build
run: yarn build
- name: ๐งช Run tests
run: ./vendor/bin/pest