Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Steam API key for testing
apiKey=
STEAM_API_KEY=
XDEBUG_MODE=coverage
PHP_VERSION=8.1
PHP_VERSION=8.3
29 changes: 8 additions & 21 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '8.1', '8.2', '8.3' ]
php: [ '8.1', '8.2', '8.3', '8.4' ]
continue-on-error: true
steps:
- uses: actions/checkout@v4
Expand All @@ -23,35 +23,22 @@ jobs:
extensions: bcmath, simplexml, libxml, curl, json, sodium
coverage: pcov

- name: Mitigate Composer lock issues
run: composer update
- name: PHP ${{ matrix.php }} - Install dependencies
run: composer update --no-interaction --prefer-dist

- name: PHP ${{ matrix.php }} - Validate composer.json and composer.lock
run: composer validate

- name: PHP ${{ matrix.php }} - Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-

- name: PHP ${{ matrix.php }} - Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install

- name: PHP ${{ matrix.php }} - Run coverage test suite
env:
apiKey: ${{ secrets.STEAM_API_KEY }}
STEAM_API_KEY: ${{ secrets.STEAM_API_KEY }}
run: composer run-script test

- name: Publish Test Coverage
uses: paambaati/codeclimate-action@v6
if: ${{ matrix.php }} == '8.1' && ${{ github.ref }} == 'master'
if: matrix.php == '8.3' && github.ref == 'refs/heads/master'
env:
apiKey: ${{ secrets.STEAM_API_KEY }}
STEAM_API_KEY: ${{ secrets.STEAM_API_KEY }}
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
XDEBUG_MODE: coverage
with:
Expand All @@ -60,9 +47,9 @@ jobs:
debug: true

- uses: sarisia/actions-status-discord@v1
if: ${{ failure() }}
if: failure()
with:
status: ${{ job.status }}
webhook: ${{ secrets.DISCORD_WEBHOOK }}
title: "${{ matrix.php }}: Tests failed."
color: 'red'
color: 'red'
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This package provides an easy way to get details from the Steam API service. Th
- `IPlayerService`
- `ISteamUser`
- `ISteamUserStats`
- `ISteamApp`
- `IStoreService`

## Installation

Expand Down Expand Up @@ -417,11 +417,11 @@ docker-compose build
# Install dependancies
docker-compose run --rm php composer install

# Run tests (assumes apiKey is set in .env file)
# Run tests (assumes STEAM_API_KEY is set in .env file)
docker-compose run --rm php composer test

# Or with the apiKey inline
docker-compose run --rm -e api=YOUR_STEAM_API_KEY php composer test
# Or with the STEAM_API_KEY inline
docker-compose run --rm -e STEAM_API_KEY=YOUR_STEAM_API_KEY php composer test

# With coverage
docker-compose run --rm php composer coverage
Expand All @@ -441,3 +441,4 @@ docker-compose run --rm php bash
- [jastend](https://github.com/jastend)
- [Teakowa](https://github.com/Teakowa)
- [Ben Sherred](https://github.com/bensherred)
- [ConrDev](https://github.com/conrdev)
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
}
],
"require": {
"php": "^8.1",
"laravel/framework": "^10.0|^11.0",
"php": ">=8.1 <8.5",
"laravel/framework": ">=10.0 <14.0",
"guzzlehttp/guzzle": "^7.8",
"ext-bcmath": "*",
"ext-simplexml": "*",
Expand All @@ -20,8 +20,8 @@
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "^10.5|^11.0",
"orchestra/testbench": "^8.0",
"phpunit/phpunit": ">=10.5 <13.0",
"orchestra/testbench": ">=8.0 <12.0",
"vlucas/phpdotenv": "^5.6",
"rector/rector": "^1.0"
},
Expand Down
Loading