Skip to content

Commit a24bb8b

Browse files
committed
Update Actions workflows
Signed-off-by: Maurício Meneghini Fauth <[email protected]>
1 parent 2b0679d commit a24bb8b

File tree

3 files changed

+111
-111
lines changed

3 files changed

+111
-111
lines changed
+44-44
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
1-
name: Lint and analyse php files
1+
name: Lint and analyse PHP files
22

33
on:
44
push:
55
pull_request:
6-
types: [opened, synchronize, reopened]
7-
branches:
8-
- master
96

107
jobs:
11-
lint-php:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v3
15-
- name: Use php 7.1
16-
uses: shivammathur/setup-php@v2
17-
with:
18-
php-version: 7.1
19-
tools: composer:v2
20-
- name: Validate composer.json and composer.lock
21-
run: composer validate
22-
- name: Cache module
23-
uses: actions/cache@v3
24-
with:
25-
path: ~/.composer/cache/
26-
key: composer-cache
27-
- name: Install dependencies
28-
run: composer install
29-
- name: Lint files
30-
run: composer run phpcs
31-
32-
analyse-php:
33-
runs-on: ubuntu-latest
34-
steps:
35-
- uses: actions/checkout@v3
36-
- name: Use php 7.1
37-
uses: shivammathur/setup-php@v2
38-
with:
39-
php-version: 7.1
40-
tools: composer:v2
41-
extensions: dbase
42-
- name: Cache module
43-
uses: actions/cache@v3
44-
with:
45-
path: ~/.composer/cache/
46-
key: composer-cache
47-
- name: Install dependencies
48-
run: composer install
49-
- name: Analyse files
50-
run: composer run phpstan
8+
lint-php:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: Set up PHP 7.1
15+
uses: shivammathur/setup-php@v2
16+
with:
17+
php-version: 7.1
18+
tools: composer:v2
19+
20+
- name: Validate composer.json and composer.lock
21+
run: composer validate --strict
22+
23+
- name: Install Composer dependencies
24+
uses: ramsey/composer-install@v2
25+
with:
26+
dependency-versions: highest
27+
28+
- name: Lint files
29+
run: composer run phpcs
30+
31+
analyse-php:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout code
35+
uses: actions/checkout@v4
36+
37+
- name: Set up PHP 7.1
38+
uses: shivammathur/setup-php@v2
39+
with:
40+
php-version: 7.1
41+
tools: composer:v2
42+
extensions: dbase
43+
44+
- name: Install Composer dependencies
45+
uses: ramsey/composer-install@v2
46+
with:
47+
dependency-versions: highest
48+
49+
- name: Analyse files
50+
run: composer run phpstan

.github/workflows/lint-docs.yml

+13-14
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
name: Lint php documentation
1+
name: Lint PHP documentation
22

33
on:
44
push:
55
pull_request:
6-
types: [opened, synchronize, reopened]
7-
branches:
8-
- master
96

107
jobs:
11-
lint-docs:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v3
15-
- name: lint php documentation
16-
uses: sudo-bot/action-doctum@v5
17-
with:
18-
config-file: ci/doctum-config.php
19-
method: "parse"
20-
cli-args: "--output-format=github --no-ansi --no-progress -v --ignore-parse-errors"
8+
lint-docs:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: Lint PHP documentation
15+
uses: sudo-bot/action-doctum@v5
16+
with:
17+
config-file: ci/doctum-config.php
18+
method: "parse"
19+
cli-args: "--output-format=github --no-ansi --no-progress -v --ignore-parse-errors"

.github/workflows/tests.yml

+54-53
Original file line numberDiff line numberDiff line change
@@ -3,58 +3,59 @@ name: Run tests
33
on:
44
push:
55
pull_request:
6-
types: [opened, synchronize, reopened]
7-
branches:
8-
- master
96

107
jobs:
11-
test-php:
12-
name: Test on php ${{ matrix.php-version }} (${{ matrix.php-extensions }}) and ${{ matrix.os }}
13-
if: "!contains(github.event.head_commit.message, '[ci skip]')"
14-
runs-on: ${{ matrix.os }}
15-
continue-on-error: ${{ matrix.experimental }}
16-
strategy:
17-
matrix:
18-
php-version: ["7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]
19-
php-extensions: ["dbase", ""]
20-
os: [ubuntu-latest]
21-
experimental: [false]
22-
composer-options: ['']
23-
include:
24-
- { php-version: 'nightly', php-extensions: '', composer-options: '--ignore-platform-req=php', experimental: true, os: ubuntu-latest }
25-
steps:
26-
- uses: actions/checkout@v3
27-
with:
28-
# Fetch some commits for Scrutinizer coverage upload
29-
fetch-depth: 15
30-
- name: Use php ${{ matrix.php-version }}
31-
uses: shivammathur/setup-php@v2
32-
with:
33-
php-version: ${{ matrix.php-version }}
34-
extensions: ${{ matrix.php-extensions }}
35-
coverage: xdebug
36-
- name: Cache module
37-
uses: actions/cache@v3
38-
with:
39-
path: ~/.composer/cache/
40-
key: composer-cache
41-
- name: Install dependencies
42-
run: composer install --no-interaction ${{ matrix.composer-options }}
43-
- name: Run php tests
44-
run: composer run phpunit
45-
- name: Run php examples
46-
run: |
47-
php -f examples/create_shapefile.php
48-
php -f examples/read_point.php > /dev/null
49-
php -f examples/read_polygon.php > /dev/null
50-
- name: Send coverage
51-
uses: codecov/codecov-action@v3
52-
with:
53-
flags: unit-${{ matrix.php-version }}-${{ matrix.php-extensions }}-${{ matrix.os }}
54-
name: phpunit-${{ matrix.php-version }}-${{ matrix.php-extensions }}-${{ matrix.os }}
55-
- name: Send coverage to Scrutinizer
56-
uses: sudo-bot/action-scrutinizer@latest
57-
# Do not run this step on forked versions of the main repository (example: contributor forks)
58-
if: github.repository == 'phpmyadmin/shapefile'
59-
with:
60-
cli-args: "--format=php-clover build/logs/clover.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}"
8+
test-php:
9+
name: Test on PHP ${{ matrix.php-version }}
10+
runs-on: ${{ matrix.os }}
11+
continue-on-error: ${{ matrix.experimental }}
12+
strategy:
13+
matrix:
14+
php-version: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
15+
php-extensions: ['dbase', '']
16+
os: [ubuntu-latest]
17+
experimental: [false]
18+
composer-options: ['']
19+
include:
20+
- { php-version: '8.4', php-extensions: '', composer-options: '--ignore-platform-req=php+', experimental: true, os: ubuntu-latest }
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
with:
25+
# Fetch some commits for Scrutinizer coverage upload
26+
fetch-depth: 15
27+
28+
- name: Set up PHP ${{ matrix.php-version }}
29+
uses: shivammathur/setup-php@v2
30+
with:
31+
php-version: ${{ matrix.php-version }}
32+
extensions: ${{ matrix.php-extensions }}
33+
coverage: xdebug
34+
35+
- name: Install Composer dependencies
36+
uses: ramsey/composer-install@v2
37+
with:
38+
dependency-versions: highest
39+
composer-options: ${{ matrix.composer-options }}
40+
41+
- name: Run PHP tests
42+
run: composer run phpunit
43+
44+
- name: Run PHP examples
45+
run: |
46+
php -f examples/create_shapefile.php
47+
php -f examples/read_point.php > /dev/null
48+
php -f examples/read_polygon.php > /dev/null
49+
50+
- name: Send coverage
51+
uses: codecov/codecov-action@v3
52+
with:
53+
flags: unit-${{ matrix.php-version }}-${{ matrix.php-extensions }}-${{ matrix.os }}
54+
name: phpunit-${{ matrix.php-version }}-${{ matrix.php-extensions }}-${{ matrix.os }}
55+
56+
- name: Send coverage to Scrutinizer
57+
uses: sudo-bot/action-scrutinizer@latest
58+
# Do not run this step on forked versions of the main repository (example: contributor forks)
59+
if: github.repository == 'phpmyadmin/shapefile'
60+
with:
61+
cli-args: "--format=php-clover build/logs/clover.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}"

0 commit comments

Comments
 (0)