Skip to content

Commit

Permalink
ci: upgrade workflow (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b authored Sep 27, 2022
1 parent 819844a commit 9c8a973
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 46 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,24 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Cache Composer dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}

- uses: php-actions/composer@v5
- name: Composer
uses: php-actions/composer@v6
with:
php_version: '8.1'

- name: Archive build
run: mkdir /tmp/github-actions/ && tar -cvf /tmp/github-actions/build.tar ./

- name: Upload build archive for test runners
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: build-artifact
path: /tmp/github-actions
Expand All @@ -31,7 +34,7 @@ jobs:
needs: [composer]

steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: build-artifact
path: /tmp/github-actions
Expand All @@ -40,9 +43,9 @@ jobs:
run: tar -xvf /tmp/github-actions/build.tar ./

- name: PHP Unit tests
uses: php-actions/phpunit@v2
uses: php-actions/phpunit@v3
with:
php_version: 8.0
php_version: 8.1
php_extensions: xdebug
configuration: test/phpunit/phpunit.xml
bootstrap: vendor/autoload.php
Expand All @@ -52,7 +55,7 @@ jobs:
needs: [composer]

steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: build-artifact
path: /tmp/github-actions
Expand All @@ -61,6 +64,6 @@ jobs:
run: tar -xvf /tmp/github-actions/build.tar ./

- name: PHP Static Analysis
uses: php-actions/phpstan@v2
uses: php-actions/phpstan@v3
with:
path: src/
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "MIT",

"require": {
"php": ">=8.0",
"php": ">=8.1",
"phpgt/http": "^v1.1"
},

Expand Down
76 changes: 40 additions & 36 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9c8a973

Please sign in to comment.