Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald committed May 16, 2024
1 parent a0d3354 commit 6673910
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 25 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,25 @@ jobs:
name: 'Test'
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.prefer }}-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-${{ matrix.prefer }}-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
coverage: pcov
tools: infection, php-cs-fixer, phpstan

- name: Install dependencies
run: composer install
Expand All @@ -38,10 +39,10 @@ jobs:
run: composer check-platform-reqs

- name: PHP-CS-Fixer
run: ./vendor/bin/php-cs-fixer fix --dry-run
run: php-cs-fixer fix --dry-run

- name: Infection
run: ./vendor/bin/infection --min-msi=100
run: infection --min-msi=100

- name: PHPStan
run: ./vendor/bin/phpstan
run: phpstan
18 changes: 0 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
"php": "^8.1",
"phpunit/phpunit": "^9.0 || ^10.0 || ^11.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.0",
"infection/infection": "^0.28.1",
"phpstan/phpstan": "^1.4"
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
Expand All @@ -43,19 +38,6 @@
},
"minimum-stability": "stable",
"prefer-stable": true,
"scripts": {
"fix": [
"./vendor/bin/php-cs-fixer fix"
],
"lint": [
"./vendor/bin/php-cs-fixer fix --dry-run",
"./vendor/bin/phpstan analyse"
],
"test": [
"./vendor/bin/phpunit",
"./vendor/bin/infection --threads=8"
]
},
"support": {
"issues": "https://github.com/timacdonald/callable-fake/issues",
"source": "https://github.com/timacdonald/callable-fake/releases/latest",
Expand Down

0 comments on commit 6673910

Please sign in to comment.