From 4b20c5caa71c52a03de5533b1788dfaf347fed04 Mon Sep 17 00:00:00 2001 From: Valithor Obsidion Date: Mon, 27 Jan 2025 13:37:47 -0500 Subject: [PATCH 1/4] Create php.yml --- .github/workflows/php.yml | 46 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/php.yml diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 0000000..bc31f39 --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,46 @@ +name: PHP Tests + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + phpunit: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Validate composer.json and composer.lock + run: composer validate --strict + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v3 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.0' + extensions: mbstring, pdo, pdo_mysql + ini-values: | + memory_limit = 512M + coverage: none + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-suggest + + - name: Run tests + run: vendor/bin/phpunit --configuration phpunit.xml From 979c9adeb2fc20d4b865e85b28606a52b581ece5 Mon Sep 17 00:00:00 2001 From: Valithor Obsidion Date: Mon, 27 Jan 2025 13:40:11 -0500 Subject: [PATCH 2/4] Create main.yml --- .github/workflows/main.yml | 45 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..9489e8b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,45 @@ +name: PHP Tests + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + phpunit: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Validate composer.json and composer.lock + run: composer validate --strict + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v3 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.0' + extensions: mbstring, pdo, pdo_mysql + ini-values: | + memory_limit = 512M + coverage: none + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-suggest + + - name: Run tests + run: vendor/bin/phpunit --configuration phpunit.xml From c42f90dd9b568c6b74e72e8801cd817b26ad6a5d Mon Sep 17 00:00:00 2001 From: Valithor Obsidion Date: Mon, 27 Jan 2025 13:50:26 -0500 Subject: [PATCH 3/4] Update composer.json --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5ff7b11..59af2ce 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,7 @@ { "name": "vzgcoders/verifier-server", - "description": "Valithor's offical webserver for BYOND user verification.", + "description": "Valithor's official webserver for BYOND user verification.", + "license": "MIT", "authors": [ { "name": "Valithor Obsidion", From 7b153c7810c9c3c43951d448e39c578a820b7a70 Mon Sep 17 00:00:00 2001 From: Valithor Obsidion Date: Mon, 27 Jan 2025 13:59:25 -0500 Subject: [PATCH 4/4] phpunit --- .github/workflows/main.yml | 3 ++- .github/workflows/php.yml | 46 -------------------------------------- 2 files changed, 2 insertions(+), 47 deletions(-) delete mode 100644 .github/workflows/php.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9489e8b..b25ce93 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,7 @@ on: branches: [ "main" ] pull_request: branches: [ "main" ] + workflow_dispatch: permissions: contents: read @@ -42,4 +43,4 @@ jobs: run: composer install --prefer-dist --no-progress --no-suggest - name: Run tests - run: vendor/bin/phpunit --configuration phpunit.xml + run: "./vendor/bin/phpunit --version" diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml deleted file mode 100644 index bc31f39..0000000 --- a/.github/workflows/php.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: PHP Tests - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -permissions: - contents: read - -jobs: - phpunit: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Validate composer.json and composer.lock - run: composer validate --strict - - - name: Cache Composer packages - id: composer-cache - uses: actions/cache@v3 - with: - path: vendor - key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-php- - - - - name: Set up PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.0' - extensions: mbstring, pdo, pdo_mysql - ini-values: | - memory_limit = 512M - coverage: none - - - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-suggest - - - name: Run tests - run: vendor/bin/phpunit --configuration phpunit.xml