Skip to content

Commit

Permalink
Add optional Windows and Ubuntu lowest tests to CI
Browse files Browse the repository at this point in the history
Updated the CI workflow to include optional tests on Windows and the Ubuntu lowest environment. Also upgraded actions/checkout and actions/cache versions to v4.
  • Loading branch information
koriym committed Nov 20, 2024
1 parent 13a6a05 commit 4d4c9f9
Showing 1 changed file with 28 additions and 15 deletions.
43 changes: 28 additions & 15 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ on:
required: false
type: string
default: '8.4'
windows:
description: Run tests on Windows
required: false
type: boolean
default: false
ubuntu_lowest:
description: Run tests on ubuntu-lowest environment
required: false
type: boolean
default: false
script:
description: Additional scripts to run
required: false
Expand All @@ -30,35 +40,37 @@ env:
jobs:
phpunit:
name: PHPUnit
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
php-version: ${{ fromJson(inputs.old_stable) }}
dependencies: [highest, lowest]
os: [ubuntu-latest]
include:
# Old stable versions
- php-version: ${{ fromJson(inputs.old_stable) }}
os: ubuntu-latest
dependencies: highest
- php-version: ${{ fromJson(inputs.old_stable) }}
os: ubuntu-latest
dependencies: lowest

# Current stable version
- php-version: ${{ inputs.current_stable }}
os: windows-latest
os: ubuntu-latest
dependencies: highest
experimental: false
- php-version: ${{ inputs.current_stable }}
os: ubuntu-latest

# Windows test (optional)
- if: ${{ inputs.windows }}
php-version: ${{ inputs.current_stable }}
os: windows-latest
dependencies: highest
experimental: false
- php-version: ${{ inputs.current_stable }}

# Ubuntu lowest test (optional)
- if: ${{ inputs.ubuntu_lowest }}
php-version: ${{ inputs.current_stable }}
os: ubuntu-lowest
dependencies: lowest
dependencies: highest
experimental: false

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -71,6 +83,7 @@ jobs:

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

- name: Cache dependencies
Expand Down

0 comments on commit 4d4c9f9

Please sign in to comment.