Skip to content

Commit e0e72dc

Browse files
authored
.github tests (#1)
* Create php.yml * Create main.yml * Update composer.json * phpunit
1 parent 7770f75 commit e0e72dc

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed

.github/workflows/main.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: PHP Tests
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
phpunit:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Validate composer.json and composer.lock
22+
run: composer validate --strict
23+
24+
- name: Cache Composer packages
25+
id: composer-cache
26+
uses: actions/cache@v3
27+
with:
28+
path: vendor
29+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
30+
restore-keys: |
31+
${{ runner.os }}-php-
32+
33+
- name: Set up PHP
34+
uses: shivammathur/setup-php@v2
35+
with:
36+
php-version: '8.0'
37+
extensions: mbstring, pdo, pdo_mysql
38+
ini-values: |
39+
memory_limit = 512M
40+
coverage: none
41+
42+
- name: Install dependencies
43+
run: composer install --prefer-dist --no-progress --no-suggest
44+
45+
- name: Run tests
46+
run: "./vendor/bin/phpunit --version"

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "vzgcoders/verifier-server",
3-
"description": "Valithor's offical webserver for BYOND user verification.",
3+
"description": "Valithor's official webserver for BYOND user verification.",
4+
"license": "MIT",
45
"authors": [
56
{
67
"name": "Valithor Obsidion",

0 commit comments

Comments
 (0)