|
25 | 25 | args: --ignore-platform-reqs |
26 | 26 |
|
27 | 27 | - name: Archive build |
28 | | - run: mkdir /tmp/github-actions/ && tar -cvf /tmp/github-actions/build.tar ./ |
| 28 | + run: mkdir /tmp/github-actions/ && tar --exclude=".git" -cvf /tmp/github-actions/build.tar ./ |
29 | 29 |
|
30 | 30 | - name: Upload build archive for test runners |
31 | 31 | uses: actions/upload-artifact@v4 |
@@ -89,73 +89,92 @@ jobs: |
89 | 89 | uses: codecov/codecov-action@v4 |
90 | 90 | with: |
91 | 91 | token: ${{ secrets.CODECOV_TOKEN }} |
92 | | -# |
93 | | -# phpstan: |
94 | | -# runs-on: ubuntu-latest |
95 | | -# needs: [ composer ] |
96 | | -# strategy: |
97 | | -# matrix: |
98 | | -# php: [ 8.1, 8.2, 8.3 ] |
99 | | -# |
100 | | -# steps: |
101 | | -# - uses: actions/download-artifact@v4 |
102 | | -# with: |
103 | | -# name: build-artifact-${{ matrix.php }} |
104 | | -# path: /tmp/github-actions |
105 | | -# |
106 | | -# - name: Extract build archive |
107 | | -# run: tar -xvf /tmp/github-actions/build.tar ./ |
108 | | -# |
109 | | -# - name: PHP Static Analysis |
110 | | -# uses: php-actions/phpstan@v3 |
111 | | -# with: |
112 | | -# php_version: ${{ matrix.php }} |
113 | | -# path: src/ |
114 | | -# level: 6 |
115 | | -# |
116 | | -# phpmd: |
117 | | -# runs-on: ubuntu-latest |
118 | | -# needs: [ composer ] |
119 | | -# strategy: |
120 | | -# matrix: |
121 | | -# php: [ 8.1, 8.2, 8.3 ] |
122 | | -# |
123 | | -# steps: |
124 | | -# - uses: actions/download-artifact@v4 |
125 | | -# with: |
126 | | -# name: build-artifact-${{ matrix.php }} |
127 | | -# path: /tmp/github-actions |
128 | | -# |
129 | | -# - name: Extract build archive |
130 | | -# run: tar -xvf /tmp/github-actions/build.tar ./ |
131 | | -# |
132 | | -# - name: PHP Mess Detector |
133 | | -# uses: php-actions/phpmd@v1 |
134 | | -# with: |
135 | | -# php_version: ${{ matrix.php }} |
136 | | -# path: src/ |
137 | | -# output: text |
138 | | -# ruleset: phpmd.xml |
139 | | -# |
140 | | -# phpcs: |
141 | | -# runs-on: ubuntu-latest |
142 | | -# needs: [ composer ] |
143 | | -# strategy: |
144 | | -# matrix: |
145 | | -# php: [ 8.1, 8.2, 8.3 ] |
146 | | -# |
147 | | -# steps: |
148 | | -# - uses: actions/download-artifact@v4 |
149 | | -# with: |
150 | | -# name: build-artifact-${{ matrix.php }} |
151 | | -# path: /tmp/github-actions |
152 | | -# |
153 | | -# - name: Extract build archive |
154 | | -# run: tar -xvf /tmp/github-actions/build.tar ./ |
155 | | -# |
156 | | -# - name: PHP Code Sniffer |
157 | | -# uses: php-actions/phpcs@v1 |
158 | | -# with: |
159 | | -# php_version: ${{ matrix.php }} |
160 | | -# path: src/ |
161 | | -# standard: phpcs.xml |
| 92 | + |
| 93 | + phpstan: |
| 94 | + runs-on: ubuntu-latest |
| 95 | + needs: [ composer ] |
| 96 | + strategy: |
| 97 | + matrix: |
| 98 | + php: [ 8.4 ] |
| 99 | + |
| 100 | + steps: |
| 101 | + - uses: actions/download-artifact@v4 |
| 102 | + with: |
| 103 | + name: build-artifact-${{ matrix.php }} |
| 104 | + path: /tmp/github-actions |
| 105 | + |
| 106 | + - name: Extract build archive |
| 107 | + run: tar -xvf /tmp/github-actions/build.tar ./ |
| 108 | + |
| 109 | + - name: PHP Static Analysis |
| 110 | + uses: php-actions/phpstan@v3 |
| 111 | + with: |
| 112 | + php_version: ${{ matrix.php }} |
| 113 | + path: src/ |
| 114 | + configuration: phpstan.neon |
| 115 | + |
| 116 | + phpmd: |
| 117 | + runs-on: ubuntu-latest |
| 118 | + needs: [ composer ] |
| 119 | + strategy: |
| 120 | + matrix: |
| 121 | + php: [ 8.4 ] |
| 122 | + |
| 123 | + steps: |
| 124 | + - uses: actions/download-artifact@v4 |
| 125 | + with: |
| 126 | + name: build-artifact-${{ matrix.php }} |
| 127 | + path: /tmp/github-actions |
| 128 | + |
| 129 | + - name: Extract build archive |
| 130 | + run: tar -xvf /tmp/github-actions/build.tar ./ |
| 131 | + |
| 132 | + - name: PHP Mess Detector |
| 133 | + uses: php-actions/phpmd@v1 |
| 134 | + with: |
| 135 | + php_version: ${{ matrix.php }} |
| 136 | + path: src/ |
| 137 | + output: text |
| 138 | + ruleset: phpmd.xml |
| 139 | + |
| 140 | + phpcs: |
| 141 | + runs-on: ubuntu-latest |
| 142 | + needs: [ composer ] |
| 143 | + strategy: |
| 144 | + matrix: |
| 145 | + php: [ 8.4 ] |
| 146 | + |
| 147 | + steps: |
| 148 | + - uses: actions/download-artifact@v4 |
| 149 | + with: |
| 150 | + name: build-artifact-${{ matrix.php }} |
| 151 | + path: /tmp/github-actions |
| 152 | + |
| 153 | + - name: Extract build archive |
| 154 | + run: tar -xvf /tmp/github-actions/build.tar ./ |
| 155 | + |
| 156 | + - name: PHP Code Sniffer |
| 157 | + uses: php-actions/phpcs@v1 |
| 158 | + with: |
| 159 | + php_version: ${{ matrix.php }} |
| 160 | + path: src/ |
| 161 | + standard: phpcs.xml |
| 162 | + |
| 163 | + remove_old_artifacts: |
| 164 | + runs-on: ubuntu-latest |
| 165 | + |
| 166 | + permissions: |
| 167 | + actions: write |
| 168 | + |
| 169 | + steps: |
| 170 | + - name: Remove old artifacts for prior workflow runs on this repository |
| 171 | + env: |
| 172 | + GH_TOKEN: ${{ github.token }} |
| 173 | + run: | |
| 174 | + gh api "/repos/${{ github.repository }}/actions/artifacts" | jq ".artifacts[] | select(.name | startswith(\"build-artifact\")) | .id" > artifact-id-list.txt |
| 175 | + while read id |
| 176 | + do |
| 177 | + echo -n "Deleting artifact ID $id ... " |
| 178 | + gh api --method DELETE /repos/${{ github.repository }}/actions/artifacts/$id && echo "Done" |
| 179 | + done <artifact-id-list.txt |
| 180 | +
|
0 commit comments