Skip to content

Commit 37405dd

Browse files
authored
CI workflow (#137)
1 parent a3ec2c3 commit 37405dd

File tree

6 files changed

+244
-194
lines changed

6 files changed

+244
-194
lines changed

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches: [ main ]
7+
8+
jobs:
9+
test-app:
10+
name: Test Speedtest Tracker (PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }})
11+
runs-on: ${{ matrix.operating-system }}
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
operating-system: ['ubuntu-22.04']
17+
php-versions: ['8.1']
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: ${{ matrix.php-versions }}
26+
extensions: mbstring, dom, fileinfo
27+
coverage: xdebug
28+
29+
- name: Get composer cache directory
30+
id: composer-cache
31+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
32+
33+
- name: Cache composer dependencies
34+
uses: actions/cache@v3
35+
with:
36+
path: ${{ steps.composer-cache.outputs.dir }}
37+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
38+
restore-keys: ${{ runner.os }}-composer-
39+
40+
- name: Install Composer dependencies
41+
run: composer install --no-progress --prefer-dist --optimize-autoloader
42+
43+
- name: Install the application
44+
run: |
45+
touch database/database.sqlite
46+
php -r "file_exists('.env') || copy('.env.example', '.env');"
47+
php artisan app:install --force
48+
49+
- name: Evaluate code quality
50+
run: vendor/bin/pint --test
51+
52+
- name: Test with phpunit including coverage
53+
run: vendor/bin/phpunit --coverage-text

_ide_helper.php

Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/**
66
* A helper file for Laravel, to provide autocomplete information to your IDE
7-
* Generated for Laravel 9.38.0.
7+
* Generated for Laravel 9.39.0.
88
*
99
* This file should not be included in your code, only analyzed by your IDE!
1010
*
@@ -12990,13 +12990,13 @@ public static function apiResource($name, $controller, $options = [])
1299012990
*
1299112991
* @param array $attributes
1299212992
* @param \Closure|array|string $routes
12993-
* @return void
12993+
* @return \Illuminate\Routing\Router
1299412994
* @static
1299512995
*/
1299612996
public static function group($attributes, $routes)
1299712997
{
1299812998
/** @var \Illuminate\Routing\Router $instance */
12999-
$instance->group($attributes, $routes);
12999+
return $instance->group($attributes, $routes);
1300013000
}
1300113001
/**
1300213002
* Merge the given array with the last group stack.
@@ -16830,6 +16830,65 @@ public static function callCreator($view)
1683016830
{
1683116831
/** @var \Illuminate\View\Factory $instance */
1683216832
$instance->callCreator($view);
16833+
}
16834+
/**
16835+
* Start injecting content into a fragment.
16836+
*
16837+
* @param string $fragment
16838+
* @return void
16839+
* @static
16840+
*/
16841+
public static function startFragment($fragment)
16842+
{
16843+
/** @var \Illuminate\View\Factory $instance */
16844+
$instance->startFragment($fragment);
16845+
}
16846+
/**
16847+
* Stop injecting content into a fragment.
16848+
*
16849+
* @return string
16850+
* @throws \InvalidArgumentException
16851+
* @static
16852+
*/
16853+
public static function stopFragment()
16854+
{
16855+
/** @var \Illuminate\View\Factory $instance */
16856+
return $instance->stopFragment();
16857+
}
16858+
/**
16859+
* Get the contents of a fragment.
16860+
*
16861+
* @param string $name
16862+
* @param string|null $default
16863+
* @return mixed
16864+
* @static
16865+
*/
16866+
public static function getFragment($name, $default = null)
16867+
{
16868+
/** @var \Illuminate\View\Factory $instance */
16869+
return $instance->getFragment($name, $default);
16870+
}
16871+
/**
16872+
* Get the entire array of rendered fragments.
16873+
*
16874+
* @return array
16875+
* @static
16876+
*/
16877+
public static function getFragments()
16878+
{
16879+
/** @var \Illuminate\View\Factory $instance */
16880+
return $instance->getFragments();
16881+
}
16882+
/**
16883+
* Flush all of the fragments.
16884+
*
16885+
* @return void
16886+
* @static
16887+
*/
16888+
public static function flushFragments()
16889+
{
16890+
/** @var \Illuminate\View\Factory $instance */
16891+
$instance->flushFragments();
1683316892
}
1683416893
/**
1683516894
* Start injecting content into a section.

app/Observers/ResultObserver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function created(Result $result)
6363

6464
// Send data to time series databases
6565
if ($this->influxDbSettings->v2_enabled) {
66-
SendDataToInfluxDbV2::dispatch($result,$this->influxDbSettings);
66+
SendDataToInfluxDbV2::dispatch($result, $this->influxDbSettings);
6767
}
6868
}
6969

app/Policies/FailedJobPolicy.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class FailedJobPolicy
1010
use HandlesAuthorization;
1111

1212
public function viewAny(User $user): bool
13-
{
14-
return config('app.debug');
15-
}
13+
{
14+
return config('app.debug');
15+
}
1616
}

0 commit comments

Comments
 (0)