Skip to content

Commit 16323bc

Browse files
authored
Destructor improvement (#91)
* ci: upgrade workflow * tweak: only close handle if it is open
1 parent cbeb514 commit 16323bc

5 files changed

Lines changed: 71 additions & 82 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
name: CI
22

3-
on: [push]
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
actions: read
8+
id-token: none
49

510
jobs:
611
composer:
712
runs-on: ubuntu-latest
813
strategy:
914
matrix:
10-
php: [ 8.4 ]
15+
php: [ 8.4, 8.5 ]
1116

1217
steps:
1318
- uses: actions/checkout@v4
@@ -31,13 +36,14 @@ jobs:
3136
with:
3237
name: build-artifact-${{ matrix.php }}
3338
path: /tmp/github-actions
39+
retention-days: 1
3440

3541
phpunit:
3642
runs-on: ubuntu-latest
3743
needs: [ composer ]
3844
strategy:
3945
matrix:
40-
php: [ 8.4 ]
46+
php: [ 8.4, 8.5 ]
4147

4248
outputs:
4349
coverage: ${{ steps.store-coverage.outputs.coverage_text }}
@@ -72,7 +78,7 @@ jobs:
7278
needs: [ phpunit ]
7379
strategy:
7480
matrix:
75-
php: [ 8.4 ]
81+
php: [ 8.4, 8.5 ]
7682

7783
steps:
7884
- uses: actions/checkout@v4
@@ -87,16 +93,13 @@ jobs:
8793

8894
- name: Upload to Codecov
8995
uses: codecov/codecov-action@v5
90-
with:
91-
token: ${{ secrets.CODECOV_TOKEN }}
92-
slug: PhpGt/Http
9396

9497
phpstan:
9598
runs-on: ubuntu-latest
9699
needs: [ composer ]
97100
strategy:
98101
matrix:
99-
php: [ 8.4 ]
102+
php: [ 8.4, 8.5 ]
100103

101104
steps:
102105
- uses: actions/download-artifact@v4
@@ -111,15 +114,14 @@ jobs:
111114
uses: php-actions/phpstan@v3
112115
with:
113116
php_version: ${{ matrix.php }}
114-
level: 6
115117
path: src/
116118

117119
phpmd:
118120
runs-on: ubuntu-latest
119121
needs: [ composer ]
120122
strategy:
121123
matrix:
122-
php: [ 8.4 ]
124+
php: [ 8.4, 8.5 ]
123125

124126
steps:
125127
- uses: actions/download-artifact@v4
@@ -143,7 +145,7 @@ jobs:
143145
needs: [ composer ]
144146
strategy:
145147
matrix:
146-
php: [ 8.4 ]
148+
php: [ 8.4, 8.5 ]
147149

148150
steps:
149151
- uses: actions/download-artifact@v4
@@ -160,22 +162,3 @@ jobs:
160162
php_version: ${{ matrix.php }}
161163
path: src/
162164
standard: phpcs.xml
163-
164-
remove_old_artifacts:
165-
runs-on: ubuntu-latest
166-
167-
permissions:
168-
actions: write
169-
170-
steps:
171-
- name: Remove old artifacts for prior workflow runs on this repository
172-
env:
173-
GH_TOKEN: ${{ github.token }}
174-
run: |
175-
gh api "/repos/${{ github.repository }}/actions/artifacts" | jq ".artifacts[] | select(.name | startswith(\"build-artifact\")) | .id" > artifact-id-list.txt
176-
while read id
177-
do
178-
echo -n "Deleting artifact ID $id ... "
179-
gh api --method DELETE /repos/${{ github.repository }}/actions/artifacts/$id && echo "Done"
180-
done <artifact-id-list.txt
181-

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/.idea
22
/vendor
33
/*.phar
4-
/test/unit/_coverage
4+
/test/unit/_coverage
5+
# Local wiki symlink
6+
docs

0 commit comments

Comments
 (0)