Skip to content

Commit e9db027

Browse files
authored
Merge pull request #1891 from hydephp/split-out-smoke-testing-workflows
Internal: Split out smoke testing workflows
2 parents 9519002 + 0a0eedc commit e9db027

File tree

2 files changed

+44
-39
lines changed

2 files changed

+44
-39
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: 🔥 Coverage Tests
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
8+
test-coverage:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: shivammathur/setup-php@v2
12+
with:
13+
php-version: "8.1"
14+
coverage: xdebug
15+
extensions: fileinfo
16+
- uses: actions/checkout@v4
17+
18+
- name: Cache Composer packages
19+
id: composer-cache
20+
uses: actions/cache@v4
21+
with:
22+
path: vendor
23+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
24+
restore-keys: |
25+
${{ runner.os }}-php-
26+
27+
- name: Install Composer Dependencies
28+
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
29+
30+
- name: Set environment to testing
31+
run: echo "ENV=testing" > .env
32+
33+
- name: Execute tests (Unit and Feature tests) via PHPUnit with coverage
34+
run: vendor/bin/pest --coverage --coverage-clover clover.xml --log-junit report.xml
35+
36+
- name: "Publish coverage report to Codecov"
37+
uses: codecov/codecov-action@v4
38+
with:
39+
token: ${{ secrets.CODECOV_TOKEN }}
40+
41+
- name: Ping statistics server with test results
42+
run: |
43+
curl https://raw.githubusercontent.com/hydephp/develop/6e9d17f31879f4ccda13a3fec4029c9663bccec0/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php
44+
php ping.php "Monorepo Smoke Tests - Coverage" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }}

.github/workflows/smoke-tests.yml

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -63,42 +63,3 @@ jobs:
6363
run: |
6464
curl https://raw.githubusercontent.com/hydephp/develop/6e9d17f31879f4ccda13a3fec4029c9663bccec0/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php
6565
php ping.php "Monorepo Smoke Tests" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }}
66-
67-
68-
test-coverage:
69-
runs-on: ubuntu-latest
70-
steps:
71-
- uses: shivammathur/setup-php@v2
72-
with:
73-
php-version: "8.1"
74-
coverage: xdebug
75-
extensions: fileinfo
76-
- uses: actions/checkout@v4
77-
78-
- name: Cache Composer packages
79-
id: composer-cache
80-
uses: actions/cache@v4
81-
with:
82-
path: vendor
83-
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
84-
restore-keys: |
85-
${{ runner.os }}-php-
86-
87-
- name: Install Composer Dependencies
88-
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
89-
90-
- name: Set environment to testing
91-
run: echo "ENV=testing" > .env
92-
93-
- name: Execute tests (Unit and Feature tests) via PHPUnit with coverage
94-
run: vendor/bin/pest --coverage --coverage-clover clover.xml --log-junit report.xml
95-
96-
- name: "Publish coverage report to Codecov"
97-
uses: codecov/codecov-action@v4
98-
with:
99-
token: ${{ secrets.CODECOV_TOKEN }}
100-
101-
- name: Ping statistics server with test results
102-
run: |
103-
curl https://raw.githubusercontent.com/hydephp/develop/6e9d17f31879f4ccda13a3fec4029c9663bccec0/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php
104-
php ping.php "Monorepo Smoke Tests - Coverage" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }}

0 commit comments

Comments
 (0)