Skip to content

Commit 1ad80e9

Browse files
Merge remote-tracking branch 'origin/minor-next' into working-smithing
2 parents 93db5ef + b680a16 commit 1ad80e9

File tree

129 files changed

+2614
-1325
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+2614
-1325
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ Requires translations:
3434

3535
## Tests
3636
<!--
37-
Details should be provided of tests done. Simply saying "tested" or equivalent is not acceptable.
38-
39-
Attach scripts or actions to test this pull request, as well as the result
37+
PRs which have not been tested MUST be marked as draft.
4038
-->
39+
I tested this PR by doing the following (tick all that apply):
40+
- [ ] Writing PHPUnit tests (commit these in the `tests/phpunit` folder)
41+
- [ ] Playtesting using a Minecraft client (provide screenshots or a video)
42+
- [ ] Writing a test plugin (provide the code and sample output)
43+
- [ ] Other (provide details)

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ updates:
33
- package-ecosystem: composer
44
directory: "/"
55
schedule:
6-
interval: daily
6+
interval: weekly
77
time: "10:00"
88
open-pull-requests-limit: 10
99
ignore:
@@ -21,4 +21,4 @@ updates:
2121
- package-ecosystem: github-actions
2222
directory: "/"
2323
schedule:
24-
interval: daily
24+
interval: weekly

.github/workflows/build-docker-image.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
run: echo NAME=$(echo "${GITHUB_REPOSITORY,,}") >> $GITHUB_OUTPUT
5454

5555
- name: Build image for tag
56-
uses: docker/build-push-action@v5.1.0
56+
uses: docker/build-push-action@v5.2.0
5757
with:
5858
push: true
5959
context: ./pocketmine-mp
@@ -66,7 +66,7 @@ jobs:
6666
6767
- name: Build image for major tag
6868
if: steps.channel.outputs.CHANNEL == 'stable'
69-
uses: docker/build-push-action@v5.1.0
69+
uses: docker/build-push-action@v5.2.0
7070
with:
7171
push: true
7272
context: ./pocketmine-mp
@@ -79,7 +79,7 @@ jobs:
7979
8080
- name: Build image for minor tag
8181
if: steps.channel.outputs.CHANNEL == 'stable'
82-
uses: docker/build-push-action@v5.1.0
82+
uses: docker/build-push-action@v5.2.0
8383
with:
8484
push: true
8585
context: ./pocketmine-mp
@@ -92,7 +92,7 @@ jobs:
9292
9393
- name: Build image for latest tag
9494
if: steps.channel.outputs.CHANNEL == 'stable'
95-
uses: docker/build-push-action@v5.1.0
95+
uses: docker/build-push-action@v5.2.0
9696
with:
9797
push: true
9898
context: ./pocketmine-mp

.github/workflows/discord-release-notify.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
- uses: actions/checkout@v4
1414

1515
- name: Setup PHP and tools
16-
uses: shivammathur/setup-php@2.28.0
16+
uses: shivammathur/setup-php@2.30.0
1717
with:
1818
php-version: 8.2
1919

2020
- name: Restore Composer package cache
21-
uses: actions/cache@v3
21+
uses: actions/cache@v4
2222
with:
2323
path: |
2424
~/.cache/composer/files

.github/workflows/draft-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
submodules: true
2121

2222
- name: Setup PHP
23-
uses: shivammathur/setup-php@2.28.0
23+
uses: shivammathur/setup-php@2.30.0
2424
with:
2525
php-version: ${{ matrix.php-version }}
2626

2727
- name: Restore Composer package cache
28-
uses: actions/cache@v3
28+
uses: actions/cache@v4
2929
with:
3030
path: |
3131
~/.cache/composer/files
@@ -86,7 +86,7 @@ jobs:
8686
${{ github.workspace }}/build_info.json
8787
8888
- name: Create draft release
89-
uses: ncipollo/release-action@v1.13.0
89+
uses: ncipollo/release-action@v1.14.0
9090
with:
9191
artifacts: ${{ github.workspace }}/PocketMine-MP.phar,${{ github.workspace }}/start.*,${{ github.workspace }}/build_info.json
9292
commit: ${{ github.sha }}

.github/workflows/main-php-matrix.yml

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
name: CI (all supported PHP versions)
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
php:
7+
description: 'PHP version in X.Y format'
8+
required: true
9+
type: string
10+
11+
#these are parameterized to ease updating
12+
pm-version-major:
13+
description: 'PocketMine-MP major version'
14+
default: 5
15+
type: number
16+
image:
17+
description: 'Runner image to use'
18+
default: 'ubuntu-20.04'
19+
type: string
20+
21+
jobs:
22+
phpstan:
23+
name: PHPStan analysis
24+
runs-on: ${{ inputs.image }}
25+
26+
strategy:
27+
fail-fast: false
28+
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- name: Setup PHP
33+
uses: pmmp/[email protected]
34+
with:
35+
php-version: ${{ inputs.php }}
36+
install-path: "./bin"
37+
pm-version-major: ${{ inputs.pm-version-major }}
38+
39+
- name: Restore Composer package cache
40+
uses: actions/cache@v4
41+
with:
42+
path: |
43+
~/.cache/composer/files
44+
~/.cache/composer/vcs
45+
key: "composer-v2-cache-${{ inputs.php }}-${{ hashFiles('./composer.lock') }}"
46+
restore-keys: |
47+
composer-v2-cache-
48+
49+
- name: Install Composer dependencies
50+
run: composer install --prefer-dist --no-interaction
51+
52+
- name: Run PHPStan
53+
run: ./vendor/bin/phpstan analyze --no-progress --memory-limit=2G
54+
55+
phpunit:
56+
name: PHPUnit tests
57+
runs-on: ${{ inputs.image }}
58+
strategy:
59+
fail-fast: false
60+
61+
steps:
62+
- uses: actions/checkout@v4
63+
64+
- name: Setup PHP
65+
uses: pmmp/[email protected]
66+
with:
67+
php-version: ${{ inputs.php }}
68+
install-path: "./bin"
69+
pm-version-major: ${{ inputs.pm-version-major }}
70+
71+
- name: Restore Composer package cache
72+
uses: actions/cache@v4
73+
with:
74+
path: |
75+
~/.cache/composer/files
76+
~/.cache/composer/vcs
77+
key: "composer-v2-cache-${{ inputs.php }}-${{ hashFiles('./composer.lock') }}"
78+
restore-keys: |
79+
composer-v2-cache-
80+
81+
- name: Install Composer dependencies
82+
run: composer install --prefer-dist --no-interaction
83+
84+
- name: Run PHPUnit tests
85+
run: ./vendor/bin/phpunit --bootstrap vendor/autoload.php --fail-on-warning tests/phpunit
86+
87+
integration:
88+
name: Integration tests
89+
runs-on: ${{ inputs.image }}
90+
strategy:
91+
fail-fast: false
92+
93+
steps:
94+
- uses: actions/checkout@v4
95+
with:
96+
submodules: true
97+
98+
- name: Setup PHP
99+
uses: pmmp/[email protected]
100+
with:
101+
php-version: ${{ inputs.php }}
102+
install-path: "./bin"
103+
pm-version-major: ${{ inputs.pm-version-major }}
104+
105+
- name: Restore Composer package cache
106+
uses: actions/cache@v4
107+
with:
108+
path: |
109+
~/.cache/composer/files
110+
~/.cache/composer/vcs
111+
key: "composer-v2-cache-${{ inputs.php }}-${{ hashFiles('./composer.lock') }}"
112+
restore-keys: |
113+
composer-v2-cache-
114+
115+
- name: Install Composer dependencies
116+
run: composer install --no-dev --prefer-dist --no-interaction
117+
118+
- name: Run integration tests
119+
run: ./tests/travis.sh -t4
120+
121+
codegen:
122+
name: Generated Code consistency checks
123+
runs-on: ${{ inputs.image }}
124+
strategy:
125+
fail-fast: false
126+
127+
steps:
128+
- uses: actions/checkout@v4
129+
130+
- name: Setup PHP
131+
uses: pmmp/[email protected]
132+
with:
133+
php-version: ${{ inputs.php }}
134+
install-path: "./bin"
135+
pm-version-major: ${{ inputs.pm-version-major }}
136+
137+
- name: Restore Composer package cache
138+
uses: actions/cache@v4
139+
with:
140+
path: |
141+
~/.cache/composer/files
142+
~/.cache/composer/vcs
143+
key: "composer-v2-cache-${{ inputs.php }}-${{ hashFiles('./composer.lock') }}"
144+
restore-keys: |
145+
composer-v2-cache-
146+
147+
- name: Install Composer dependencies
148+
run: composer install --no-dev --prefer-dist --no-interaction
149+
150+
- name: Regenerate registry annotations
151+
run: php build/generate-registry-annotations.php src
152+
153+
- name: Regenerate KnownTranslation APIs
154+
run: php build/generate-known-translation-apis.php
155+
156+
- name: Regenerate BedrockData available files constants
157+
run: php build/generate-bedrockdata-path-consts.php
158+
159+
- name: Regenerate YmlServerProperties constants
160+
run: php build/generate-pocketmine-yml-property-consts.php
161+
162+
- name: Verify code is unchanged
163+
run: |
164+
git diff
165+
git diff --quiet

0 commit comments

Comments
 (0)