Skip to content

Commit

Permalink
try different CI configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanbrauer committed Aug 23, 2023
1 parent 3d6ab7f commit 64f1e58
Showing 1 changed file with 39 additions and 99 deletions.
138 changes: 39 additions & 99 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,106 +1,46 @@
name: CI
name: Tests

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

jobs:
# analysis:
# strategy:
# matrix:
# dependencies:
# - "locked"
# php-version:
# - "7.4"
# operating-system:
# - "ubuntu-latest"

# runs-on: ${{ matrix.operating-system }}
# steps:
# - name: PHP Installation
# uses: shivammathur/setup-php@v2
# with:
# php-version: "${{ matrix.php-version }}"
# extensions: bcmath

# - name: Code Checkout
# uses: actions/checkout@v2

# - name: "Cache dependencies"
# uses: "actions/cache@v2"
# with:
# path: |
# ~/.composer/cache
# vendor
# key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
# restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"

# - name: "Install lowest dependencies"
# if: ${{ matrix.dependencies == 'lowest' }}
# run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest --ignore-platform-req=php"

# - name: "Install highest dependencies"
# if: ${{ matrix.dependencies == 'highest' }}
# run: "composer update --no-interaction --no-progress --no-suggest --ignore-platform-req=php"

# - name: "Install locked dependencies"
# if: ${{ matrix.dependencies == 'locked' }}
# run: "composer install --no-interaction --no-progress --no-suggest --ignore-platform-req=php"

# - name: Validate
# run: |
# composer validate
# composer normalize --dry-run

tests:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
dependencies:
# - "lowest"
# - "highest"
- "locked"
php-version:
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
operating-system:
- "ubuntu-latest"

runs-on: ${{ matrix.operating-system }}
os: [ubuntu-latest, macos-latest, windows-latest]
php: ['7.3', '7.4', '8.0', '8.1', '8.2']
dependency-version: [prefer-lowest, prefer-stable]
parallel: ['', '--parallel']
exclude:
- php: 8.1
os: macos-latest
- php: 8.1
os: windows-latest
- php: 8.2
os: macos-latest
- php: 8.2
os: windows-latest

name: PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }} - ${{ matrix.parallel }}

steps:
- name: PHP Installation
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
extensions: bcmath

- name: Code Checkout
uses: actions/checkout@v2

- name: "Cache dependencies"
uses: "actions/cache@v2"
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress --no-suggest"

- name: "Install locked dependencies"
if: ${{ matrix.dependencies == 'locked' }}
run: "composer install --no-interaction --no-progress --no-suggest"

- name: Test
run: vendor/bin/pest
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none

# - name: Setup Problem Matchers
# run: |
# echo "::add-matcher::${{ runner.tool_cache }}/php.json"
# echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Install PHP dependencies
run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress

- name: Unit Tests
run: php bin/pest --colors=always --exclude-group=integration ${{ matrix.parallel }}

0 comments on commit 64f1e58

Please sign in to comment.