Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Commit 14b2ed3

Browse files
committed
Add PHP 8.3 to CI and add "permissions"
1 parent 781af99 commit 14b2ed3

File tree

2 files changed

+79
-68
lines changed

2 files changed

+79
-68
lines changed
Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,47 @@
11
name: Lint and analyse files
22

3+
permissions:
4+
contents: read
5+
36
on: [push]
47

58
jobs:
6-
lint-php:
7-
name: Lint file
8-
runs-on: ubuntu-latest
9-
steps:
10-
- uses: actions/checkout@v4
11-
- name: Use php 7.1
12-
uses: shivammathur/setup-php@v2
13-
with:
14-
php-version: 7.1
15-
- name: Validate composer.json and composer.lock
16-
run: composer validate
17-
- name: Cache module
18-
uses: actions/cache@v3
19-
with:
20-
path: ~/.composer/cache/
21-
key: composer-cache
22-
- name: Install dependencies
23-
run: composer install --no-interaction
24-
- name: Lint files
25-
run: composer run phpcs
9+
lint-php:
10+
name: Lint file
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Use php 7.1
15+
uses: shivammathur/setup-php@v2
16+
with:
17+
php-version: 7.1
18+
- name: Validate composer.json and composer.lock
19+
run: composer validate
20+
- name: Cache module
21+
uses: actions/cache@v3
22+
with:
23+
path: ~/.composer/cache/
24+
key: composer-cache
25+
- name: Install dependencies
26+
run: composer install --no-interaction
27+
- name: Lint files
28+
run: composer run phpcs
2629

27-
analyse-php:
28-
name: Analyse files
29-
runs-on: ubuntu-latest
30-
steps:
31-
- uses: actions/checkout@v4
32-
- name: Use php 7.4
33-
uses: shivammathur/setup-php@v2
34-
with:
35-
php-version: 7.4
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
43-
- name: Analyse files
44-
run: composer run phpstan
30+
analyse-php:
31+
name: Analyse files
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
- name: Use php 7.4
36+
uses: shivammathur/setup-php@v2
37+
with:
38+
php-version: 7.4
39+
- name: Cache module
40+
uses: actions/cache@v3
41+
with:
42+
path: ~/.composer/cache/
43+
key: composer-cache
44+
- name: Install dependencies
45+
run: composer install --no-interaction
46+
- name: Analyse files
47+
run: composer run phpstan

.github/workflows/tests.yml

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,46 @@
11
name: Run tests
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
pull_request:
69
types: [opened, synchronize, reopened]
710

811
jobs:
9-
test-php:
10-
name: Test on php ${{ matrix.php-version }} and ${{ matrix.os }}
11-
runs-on: ${{ matrix.os }}
12-
continue-on-error: ${{ matrix.experimental }}
13-
strategy:
14-
matrix:
15-
php-version: ["7.1.3", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]
16-
experimental: [false]
17-
os: [ubuntu-latest]
18-
composer-options: ['']
19-
include:
20-
- { php-version: 'nightly', composer-options: '--ignore-platform-req=php', experimental: true, os: ubuntu-latest }
21-
steps:
22-
- uses: actions/checkout@v4
23-
- name: Use php ${{ matrix.php-version }}
24-
uses: shivammathur/setup-php@v2
25-
with:
26-
php-version: ${{ matrix.php-version }}
27-
coverage: xdebug
28-
- name: Cache module
29-
uses: actions/cache@v3
30-
with:
31-
path: ~/.composer/cache/
32-
key: composer-cache
33-
- name: Install dependencies
34-
run: composer install --no-interaction --prefer-dist --no-progress ${{ matrix.composer-options }}
35-
- name: Run php tests
36-
run: composer run test
37-
- name: Send coverage
38-
uses: codecov/codecov-action@v3
12+
test-php:
13+
name: Test on php ${{ matrix.php-version }} and ${{ matrix.os }}
14+
runs-on: ${{ matrix.os }}
15+
continue-on-error: ${{ matrix.experimental }}
16+
strategy:
17+
matrix:
18+
php-version: ["7.1.3", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]
19+
experimental: [false]
20+
os: [ubuntu-latest]
21+
composer-options: [""]
22+
include:
23+
- {
24+
php-version: "nightly",
25+
composer-options: "--ignore-platform-req=php",
26+
experimental: true,
27+
os: ubuntu-latest,
28+
}
29+
steps:
30+
- uses: actions/checkout@v4
31+
- name: Use php ${{ matrix.php-version }}
32+
uses: shivammathur/setup-php@v2
33+
with:
34+
php-version: ${{ matrix.php-version }}
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 --prefer-dist --no-progress ${{ matrix.composer-options }}
43+
- name: Run php tests
44+
run: composer run test
45+
- name: Send coverage
46+
uses: codecov/codecov-action@v3

0 commit comments

Comments
 (0)