Skip to content

Commit

Permalink
Try this
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfnl committed Nov 30, 2024
1 parent 71a6018 commit 2ce19da
Showing 1 changed file with 9 additions and 54 deletions.
63 changes: 9 additions & 54 deletions .github/workflows/test-requirements-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,44 +89,19 @@ jobs:
matrix:
os: ['ubuntu-latest', 'windows-latest']
cmd: ['phpcs', 'phpcbf']
php: ['7.2', 'latest', 'nightly']
extensions: ['']

include:
# Test runs where the requirements check should pass.
- name: "PHP 7.2, extensions: default, expected: success"
php: '7.2'
extensions: ''
expected: 'success'

- name: "PHP latest, extensions: default, expected: success"
php: 'latest'
extensions: ''
expected: 'success'

# This test _should_ pass, but is allowed to continue-on-error in the actual workflows.
- name: "PHP nightly, extensions: default, expected: success"
php: 'nightly'
extensions: ''
- name: "extensions: default, expected: success"
expected: 'success'


# Test runs where only the _minimum_ extension requirements are met should pass.
- name: "PHP 7.2, extensions: minimal, expected: success"
php: '7.2'
- name: "extensions: minimal, expected: success"
extensions: 'none, tokenizer, xmlwriter, SimpleXML'
expected: 'success'

- name: "PHP latest, extensions: minimal, expected: success"
php: 'latest'
extensions: 'none, tokenizer, xmlwriter, SimpleXML'
expected: 'success'

# This test _should_ pass, but is allowed to continue-on-error in the actual workflows.
- name: "PHP nightly, extensions: minimal, expected: success"
php: 'nightly'
extensions: 'none, tokenizer, xmlwriter, SimpleXML'
expected: 'success'


# Test failing the requirements check when the PHP version is too low.
- name: "PHP 5.3, fail on PHP too low"
php: '5.3'
Expand All @@ -153,46 +128,26 @@ jobs:
# expected: 'fail'

# TRY THIS, though probably won't work.
- name: "PHP 7.2, fail on missing tokenizer"
php: '7.2'
extensions: 'none, xmlwriter, SimpleXML'
expected: 'fail'
- name: "PHP latest, fail on missing tokenizer"
php: 'latest'
- name: "fail on missing tokenizer"
extensions: 'none, xmlwriter, SimpleXML'
expected: 'fail'

- name: "PHP 7.2, fail on missing xmlwriter"
php: '7.2'
extensions: ':xmlwriter'
expected: 'fail'
- name: "PHP latest, fail on missing xmlwriter"
php: 'latest'
- name: "fail on missing xmlwriter"
extensions: ':xmlwriter'
expected: 'fail'

- name: "PHP 7.2, fail on missing SimpleXML"
php: '7.2'
extensions: ':SimpleXML'
expected: 'fail'
- name: "PHP latest, fail on missing SimpleXML"
php: 'latest'
- name: "fail on missing SimpleXML"
extensions: ':SimpleXML'
expected: 'fail'

- name: "PHP 7.2, fail on missing required XML extensions"
php: '7.2'
extensions: ':xmlwriter, :SimpleXML'
expected: 'fail'
- name: "PHP latest, fail on missing required XML extensions"
php: 'latest'
- name: "fail on missing both required XML extensions"
extensions: ':xmlwriter, :SimpleXML'
expected: 'fail'


# yamllint disable-line rule:line-length
# TODO
name: "Plain: ${{ matrix.cmd }} (${{ matrix.os == 'ubuntu-latest' && 'Linux' || 'Win' }}) ${{ matrix.name }}"
name: "Plain: ${{ matrix.cmd }} PHP ${{ matrix.php }} (${{ matrix.os == 'ubuntu-latest' && 'Linux' || 'Win' }}) ${{ matrix.name }}"

continue-on-error: ${{ matrix.php == 'nightly' }}

Expand Down

0 comments on commit 2ce19da

Please sign in to comment.