@@ -56,111 +56,3 @@ jobs:
5656 run : yarn run build:production
5757 env :
5858 NODE_OPTIONS : --openssl-legacy-provider
59-
60- test-pterodactyl :
61- name : Test Pterodactyl
62- runs-on : ubuntu-24.04
63- permissions :
64- contents : read
65- strategy :
66- fail-fast : false
67- matrix :
68- php : [8.2, 8.3]
69- database :
70- - mariadb:11.5
71- - mysql:9
72- services :
73- database :
74- image : ${{ matrix.database }}
75- env :
76- MYSQL_ALLOW_EMPTY_PASSWORD : yes
77- MYSQL_DATABASE : testing
78- ports :
79- - 3306
80- steps :
81- - name : Checkout Pterodactyl stable
82- uses : actions/checkout@v4
83- with :
84- repository : pterodactyl/panel
85- path : panel
86-
87- - name : Install apt dependencies
88- run : |
89- sudo apt-get update
90- sudo apt-get install -y curl git gnupg unzip wget zip sed grep gawk inotify-tools
91-
92- - name : Setup Node and Yarn
93- uses : actions/setup-node@v4
94- with :
95- node-version : ' 22'
96- cache : ' yarn'
97- cache-dependency-path : panel/yarn.lock
98-
99- - name : Checkout latest commit
100- uses : actions/checkout@v4
101- with :
102- path : blueprint
103-
104- - name : Overwrite Pterodactyl files with latest commit
105- run : cp -r blueprint/* panel/
106-
107- - name : Install node dependencies
108- working-directory : panel
109- run : yarn install
110-
111- - name : Prepare Blueprint
112- working-directory : panel
113- run : |
114- echo 'WEBUSER="runner"; OWNERSHIP="runner:runner"; USERSHELL="/bin/bash";' > .blueprintrc
115- chmod +x blueprint.sh
116-
117- - name : Get cache directory
118- id : composer-cache
119- working-directory : panel
120- run : |
121- echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
122-
123- - name : Cache
124- uses : actions/cache@v4
125- with :
126- path : ${{ steps.composer-cache.outputs.dir }}
127- key : ${{ runner.os }}-composer-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
128- restore-keys : |
129- ${{ runner.os }}-composer-${{ matrix.php }}-
130-
131- - name : Setup PHP
132- uses : shivammathur/setup-php@v2
133- with :
134- php-version : ${{ matrix.php }}
135- extensions : bcmath, cli, curl, gd, mbstring, mysql, openssl, pdo, tokenizer, xml, zip
136- tools : composer:v2
137- coverage : none
138-
139- - name : Setup .env
140- working-directory : panel
141- run : cp .env.ci .env
142-
143- - name : Install dependencies
144- working-directory : panel
145- run : composer install --no-interaction --no-progress --no-suggest --prefer-dist
146-
147- - name : Setup Blueprint
148- working-directory : panel
149- run : bash blueprint.sh
150- env :
151- BLUEPRINT_ENVIRONMENT : ci
152- TERM : xterm-kitty # fixes tput errors
153-
154- - name : Unit tests
155- working-directory : panel
156- run : vendor/bin/phpunit --bootstrap vendor/autoload.php tests/Unit
157- if : ${{ always() }}
158- env :
159- DB_HOST : UNIT_NO_DB
160-
161- - name : Integration tests
162- working-directory : panel
163- run : vendor/bin/phpunit tests/Integration
164- env :
165- DB_PORT : ${{ job.services.database.ports[3306] }}
166- DB_USERNAME : root
0 commit comments