|
48 | 48 | path: bin/dphp |
49 | 49 | build-docker: |
50 | 50 | runs-on: self-hosted |
| 51 | + outputs: |
| 52 | + image: ${{ steps.meta.outputs.tags }} |
51 | 53 | steps: |
52 | 54 | - uses: actions/checkout@v4 |
53 | 55 | - name: Login to Docker Hub |
@@ -102,6 +104,19 @@ jobs: |
102 | 104 | cache-from: type=gha,scope=image |
103 | 105 | cache-to: type=gha,mode=max,scope=image |
104 | 106 | platforms: linux/amd64,linux/arm64 |
| 107 | + - name: Build Test Image |
| 108 | + uses: docker/build-push-action@v5 |
| 109 | + with: |
| 110 | + context: ./ |
| 111 | + file: Dockerfile |
| 112 | + target: test |
| 113 | + push: true |
| 114 | + pull: true |
| 115 | + tags: ghcr.io/${{ github.repository_owner }}/durable-php/runtime-tests:${{ github.sha }} |
| 116 | + labels: ${{ steps.meta.outputs.labels }} |
| 117 | + builder: ${{ steps.buildx.outputs.name }} |
| 118 | + cache-from: type=gha,scope=image |
| 119 | + platforms: linux/amd64 |
105 | 120 | build-osx: |
106 | 121 | strategy: |
107 | 122 | fail-fast: true |
@@ -143,3 +158,40 @@ jobs: |
143 | 158 | with: |
144 | 159 | name: dphp-${{ runner.os }}-${{ matrix.platform }} |
145 | 160 | path: cli/dist/dphp |
| 161 | + performance-test: |
| 162 | + name: Performance Test |
| 163 | + needs: |
| 164 | + - build-docker |
| 165 | + - build-linux |
| 166 | + runs-on: self-hosted |
| 167 | + container: ghcr.io/${{ github.repository_owner }}/durable-php/runtime-tests:${{ github.sha }} |
| 168 | + services: |
| 169 | + dphp: |
| 170 | + image: ghcr.io/${{ github.repository_owner }}/durable-php/runtime-tests:${{ github.sha }} |
| 171 | + ports: |
| 172 | + - 8080:8080 |
| 173 | + volumes: |
| 174 | + - ${{ github.workspace }}:/app |
| 175 | + env: |
| 176 | + DPHP_HOST: http://dphp:8080 |
| 177 | + steps: |
| 178 | + - uses: actions/checkout@v4 |
| 179 | + - run: | |
| 180 | + dphp composer install |
| 181 | + - run: | |
| 182 | + echo "Running perf test" |
| 183 | + dphp exec tests/PerformanceTests/PerformanceClient.php |
| 184 | + echo "Running fan out/in test" |
| 185 | + dphp exec tests/PerformanceTests/FanOutFanInClient.php |
| 186 | + echo "Running seq test" |
| 187 | + dphp exec tests/PerformanceTests/SequenceClient.php |
| 188 | + - uses: peter-evans/find-comment@v3 |
| 189 | + id: fc |
| 190 | + with: |
| 191 | + issue-number: ${{ github.event.pull_request.number }} |
| 192 | + body-includes: Performance Metrics |
| 193 | + - uses: peter-evans/create-or-update-comment@v4 |
| 194 | + with: |
| 195 | + comment-id: ${{ steps.fc.outputs.comment-id }} |
| 196 | + issue-number: ${{ github.event.pull_request.number }} |
| 197 | + body-path: report.md |
0 commit comments