Skip to content

Commit 055f135

Browse files
committed
GH Actions: move bashunit tests to own workflow
1 parent 054315d commit 055f135

File tree

2 files changed

+61
-12
lines changed

2 files changed

+61
-12
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: E2E Tests
2+
3+
on:
4+
# Run on pushes to `master`/`4.0` and on all pull requests.
5+
# Prevent the build from running when there are only irrelevant changes.
6+
push:
7+
branches:
8+
- master
9+
- 4.0
10+
tags:
11+
- '**'
12+
paths-ignore:
13+
- '**.md'
14+
pull_request:
15+
# Allow manually triggering the workflow.
16+
workflow_dispatch:
17+
18+
jobs:
19+
bash-tests:
20+
# Cancels all previous runs of this particular job for the same branch that have not yet completed.
21+
concurrency:
22+
# The concurrency group contains the workflow name, job name, job index and the branch name.
23+
group: ${{ github.workflow }}-${{ github.job }}-${{ strategy.job-index }}-${{ github.ref }}
24+
cancel-in-progress: true
25+
26+
runs-on: 'ubuntu-latest'
27+
28+
strategy:
29+
matrix:
30+
php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
31+
32+
# yamllint disable-line rule:line-length
33+
name: "E2E PHP: ${{ matrix.php }}"
34+
35+
continue-on-error: ${{ matrix.php == '8.5' }}
36+
37+
steps:
38+
- name: Prepare git to leave line endings alone
39+
run: git config --global core.autocrlf input
40+
41+
- name: Checkout code
42+
uses: actions/checkout@v4
43+
44+
- name: Install PHP
45+
uses: shivammathur/setup-php@v2
46+
with:
47+
php-version: ${{ matrix.php }}
48+
ini-values: "error_reporting=-1, display_errors=On"
49+
coverage: none
50+
51+
- name: "Install bashunit"
52+
shell: bash
53+
run: |
54+
curl -s https://bashunit.typeddevs.com/install.sh > install.sh
55+
chmod +x install.sh
56+
./install.sh
57+
58+
- name: "Run bashunit tests"
59+
shell: bash
60+
run: "./lib/bashunit -p tests/EndToEnd"

.github/workflows/test.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -247,21 +247,10 @@ jobs:
247247
env:
248248
PHP_CODESNIFFER_CBF: '1'
249249

250-
- name: "Install bashunit"
251-
if: ${{ matrix.custom_ini == false && matrix.os == 'ubuntu-latest' }}
252-
run: |
253-
curl -s https://bashunit.typeddevs.com/install.sh > install.sh
254-
chmod +x install.sh
255-
./install.sh
256-
257-
- name: "Run bashunit tests"
258-
if: ${{ matrix.custom_ini == false && matrix.os == 'ubuntu-latest' }}
259-
run: "./lib/bashunit -p tests/EndToEnd"
260-
261250
# Note: The code style check is run multiple times against every PHP version
262251
# as it also acts as an integration test.
263252
- name: 'PHPCS: check code style without cache, no parallel'
264-
if: ${{ matrix.custom_ini == false && matrix.os == 'windows-latest' }}
253+
if: ${{ matrix.custom_ini == false }}
265254
run: php "bin/phpcs" --no-cache --parallel=1
266255

267256
- name: Download the PHPCS phar

0 commit comments

Comments
 (0)