Skip to content

Commit 8ec5f43

Browse files
committed
Update workflows
1 parent d6aa383 commit 8ec5f43

File tree

2 files changed

+31
-15
lines changed

2 files changed

+31
-15
lines changed

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Generate docs
22

33
on:
44
push:
5+
branches: [ "master" ]
56
pull_request:
6-
schedule:
7-
- cron: "0 12 * * 6"
7+
branches: [ "master" ]
88

99
jobs:
1010
generate-docs:

.github/workflows/test.yml

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,42 @@
1-
name: Run tests
1+
name: PHP Composer
22

33
on:
44
push:
5+
branches: [ "master" ]
56
pull_request:
6-
schedule:
7-
- cron: "0 12 * * 6"
7+
branches: [ "master" ]
8+
9+
permissions:
10+
contents: read
811

912
jobs:
10-
test-plugin:
13+
build:
14+
1115
runs-on: ubuntu-latest
1216

1317
steps:
14-
- name: Checkout code
15-
uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
1619

17-
- name: Set up environment
18-
run: cp phpunit.dist.xml phpunit.xml
20+
- name: Set up PHP with Xdebug
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: '8.2'
24+
coverage: xdebug
1925

20-
- name: Install composer dependencies
21-
uses: nick-zh/[email protected]
26+
- name: Validate composer.json and composer.lock
27+
run: composer validate --strict
28+
29+
- name: Cache Composer packages
30+
id: composer-cache
31+
uses: actions/cache@v3
2232
with:
23-
args: 'install --ignore-platform-reqs'
33+
path: vendor
34+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
35+
restore-keys: |
36+
${{ runner.os }}-php-
37+
38+
- name: Install dependencies
39+
run: composer install --prefer-dist --no-progress
2440

25-
- name: Run tests
26-
run: composer test
41+
- name: Run test suite
42+
run: vendor/bin/phpunit

0 commit comments

Comments
 (0)