Skip to content

Commit 8cd20c6

Browse files
committed
Merge branch 'main' into tests-php84
* main: (49 commits) Remove unused `spatie/laravel-ray` dependency Configure run-tests on and schedule Run tests across MySQL, Postgres and SQLite (#142) Fix code styling Fix fetching of incident and schedule updateables Fix code styling Change integer types for status columns Compile Assets Update API endpoint descriptions Compile Assets Reinstate incident user relationship Update README.md incorrect sponsor URL (#141) Remove incorrect status field Fix code styling Larastan 3.x and fixes for the phpstan errors (#140) Fix Static Analysis check by removing types (#138) Fix code styling Add a `cachet:make:user` command (#139) Test fixing action Make User resource mixin of Authenticatable ...
2 parents 78f52ae + 3150651 commit 8cd20c6

File tree

177 files changed

+2748
-1635
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+2748
-1635
lines changed

.github/DEPENDABOT.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ updates:
33
- package-ecosystem: composer
44
directory: "/"
55
schedule:
6-
interval: weekly
7-
day: monday
6+
interval: daily
7+
time: "07:00"
88
groups:
99
php-dependencies:
1010
update-types:

.github/workflows/compile-assets.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup PHP
1717
uses: shivammathur/setup-php@v2
1818
with:
19-
php-version: ${{ matrix.php }}
19+
php-version: 8.3
2020
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
2121
coverage: none
2222

@@ -27,7 +27,7 @@ jobs:
2727
2828
- uses: actions/setup-node@v4
2929
with:
30-
node-version: 18
30+
node-version: 22
3131

3232
- name: Install NPM dependencies
3333
run: npm ci

.github/workflows/run-tests.yml

Lines changed: 169 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
name: run-tests
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- '*.x'
8+
pull_request:
9+
schedule:
10+
- cron: '0 0 * * *'
411

512
jobs:
6-
test:
7-
runs-on: ${{ matrix.os }}
13+
static-analysis:
14+
runs-on: ubuntu-latest
815
strategy:
916
fail-fast: false
1017
matrix:
11-
os: [ubuntu-latest]
1218
php: [8.4, 8.3, 8.2]
1319
laravel: [11.x]
1420
stability: [prefer-lowest, prefer-stable]
1521

16-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
22+
name: Static Analysis - P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}
1723

1824
steps:
1925
- name: Checkout code
@@ -26,10 +32,150 @@ jobs:
2632
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
2733
coverage: none
2834

29-
- name: Setup problem matchers
35+
- name: Install dependencies
36+
run: |
37+
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
38+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
39+
40+
- name: Run PHPStan
41+
run: vendor/bin/phpstan --error-format=github
42+
43+
mysql:
44+
runs-on: ubuntu-latest
45+
46+
services:
47+
mysql:
48+
image: mysql:8.0
49+
env:
50+
MYSQL_ROOT_PASSWORD: root
51+
MYSQL_DATABASE: cachet
52+
MYSQL_USER: cachet
53+
MYSQL_PASSWORD: password
54+
ports:
55+
- 3306:3306
56+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
57+
58+
strategy:
59+
fail-fast: false
60+
matrix:
61+
php: [8.4, 8.3, 8.2]
62+
laravel: [11.x]
63+
stability: [prefer-lowest, prefer-stable]
64+
65+
name: Tests - P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - MySQL 8.0
66+
67+
steps:
68+
- name: Checkout code
69+
uses: actions/checkout@v4
70+
71+
- name: Setup PHP
72+
uses: shivammathur/setup-php@v2
73+
with:
74+
php-version: ${{ matrix.php }}
75+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
76+
coverage: none
77+
78+
- name: Install dependencies
79+
run: |
80+
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
81+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
82+
83+
- name: Install frontend dependencies
84+
run: npm ci
85+
86+
- name: Build assets
87+
run: npm run build
88+
89+
- name: Build tests environment
90+
run: composer build
91+
92+
- name: Execute tests
93+
run: composer test
94+
env:
95+
DB_CONNECTION: mysql
96+
DB_HOST: localhost
97+
DB_DATABASE: cachet
98+
DB_USERNAME: cachet
99+
DB_PASSWORD: password
100+
101+
postgres:
102+
runs-on: ubuntu-latest
103+
104+
services:
105+
postgres:
106+
image: postgres:13
107+
env:
108+
POSTGRES_DB: cachet
109+
POSTGRES_USER: cachet
110+
POSTGRES_PASSWORD: password
111+
ports:
112+
- 5432:5432
113+
options: --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3
114+
115+
strategy:
116+
fail-fast: false
117+
matrix:
118+
php: [8.4, 8.3, 8.2]
119+
laravel: [11.x]
120+
stability: [prefer-lowest, prefer-stable]
121+
122+
name: Tests - P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - PostgreSQL 13
123+
124+
steps:
125+
- name: Checkout code
126+
uses: actions/checkout@v4
127+
128+
- name: Setup PHP
129+
uses: shivammathur/setup-php@v2
130+
with:
131+
php-version: ${{ matrix.php }}
132+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
133+
coverage: none
134+
135+
- name: Install dependencies
30136
run: |
31-
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
32-
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
137+
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
138+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
139+
140+
- name: Install frontend dependencies
141+
run: npm ci
142+
143+
- name: Build assets
144+
run: npm run build
145+
146+
- name: Build tests environment
147+
run: composer build
148+
149+
- name: Execute tests
150+
run: composer test
151+
env:
152+
DB_CONNECTION: mysql
153+
DB_HOST: localhost
154+
DB_DATABASE: cachet
155+
DB_USERNAME: cachet
156+
DB_PASSWORD: password
157+
158+
sqlite:
159+
runs-on: ubuntu-latest
160+
strategy:
161+
fail-fast: false
162+
matrix:
163+
php: [ 8.3, 8.2 ]
164+
laravel: [ 11.x ]
165+
stability: [ prefer-lowest, prefer-stable ]
166+
167+
name: Tests - P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - SQLite
168+
169+
steps:
170+
- name: Checkout code
171+
uses: actions/checkout@v4
172+
173+
- name: Setup PHP
174+
uses: shivammathur/setup-php@v2
175+
with:
176+
php-version: ${{ matrix.php }}
177+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
178+
coverage: none
33179

34180
- name: Install dependencies
35181
run: |
@@ -47,3 +193,18 @@ jobs:
47193

48194
- name: Execute tests
49195
run: composer test
196+
197+
check:
198+
if: always()
199+
needs:
200+
- static-analysis
201+
- mysql
202+
- postgres
203+
- sqlite
204+
runs-on: ubuntu-latest
205+
206+
steps:
207+
- name: Check if all jobs are passing
208+
uses: re-actors/alls-green@release/v1
209+
with:
210+
jobs: ${{ toJSON(needs) }}

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
<a href="https://packagist.org/packages/cachethq/core">
1919
<img src="https://img.shields.io/packagist/v/cachethq/core" alt="Latest Stable Version">
2020
</a>
21-
<a href="https://packagist.org/packages/cachethq/core">
22-
<img src="https://img.shields.io/github/license/cachethq/core" alt="License">
23-
</a>
2421
</p>
2522

2623
## Introduction
@@ -34,8 +31,7 @@ Cachet 3.x is currently in development and is not yet completely ready for produ
3431
- [x] Incident Management
3532
- [x] Incident Updates
3633
- [x] Scheduled Maintenance
37-
- [ ] Scheduled Maintenance Updates
38-
- WIP - https://github.com/cachethq/core/pull/109
34+
- [x] Scheduled Maintenance Updates
3935
- [x] Components
4036
- [ ] Metrics
4137
- API and dashboard are working.
@@ -84,7 +80,7 @@ Login to the account at `/dashboard` and use credentials:
8480
<p align="center">
8581
<a href="https://jump24.co.uk"><img width="100px" src="https://github.com/jumptwentyfour.png" alt="Jump24"></a>
8682
<a href="https://dreamtilt.com.au"><img width="100px" src="https://github.com/dreamtilt.png" alt="Dreamtilt"></a>
87-
<a href="https://xyhen-it.nl"><img width="100px" src="https://github.com/xyphen-it.png" alt="Xyphen-IT"></a>
83+
<a href="https://xyphen-it.nl"><img width="100px" src="https://github.com/xyphen-it.png" alt="Xyphen-IT"></a>
8884
</p>
8985

9086
## Security Vulnerabilities

composer.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,28 @@
2121
"require": {
2222
"php": "^8.2",
2323
"doctrine/dbal": "^3.6",
24-
"filament/filament": "^3.2.23",
24+
"filament/filament": "^3.2.57",
2525
"filament/spatie-laravel-settings-plugin": "^3.2",
2626
"guzzlehttp/guzzle": "^7.8",
27-
"illuminate/console": "^11.0",
28-
"illuminate/database": "^11.0",
29-
"illuminate/events": "^11.0",
30-
"illuminate/queue": "^11.0",
31-
"illuminate/support": "^11.0",
27+
"illuminate/console": "^11.23.0",
28+
"illuminate/database": "^11.23.0",
29+
"illuminate/events": "^11.23.0",
30+
"illuminate/queue": "^11.23.0",
31+
"illuminate/support": "^11.23.0",
3232
"nesbot/carbon": "^2.70",
33+
"spatie/laravel-data": "^4.11",
3334
"spatie/laravel-query-builder": "^5.5",
3435
"spatie/laravel-settings": "^3.2",
3536
"timacdonald/json-api": "^v1.0.0-beta.4",
3637
"twig/twig": "^3.0"
3738
},
3839
"require-dev": {
40+
"larastan/larastan": "^3.0",
3941
"laravel/pail": "^1.1",
4042
"orchestra/testbench": "^9.5.1",
4143
"pestphp/pest": "^3.2",
4244
"pestphp/pest-plugin-laravel": "^3.0",
43-
"pestphp/pest-plugin-livewire": "*",
44-
"spatie/laravel-ray": "^1.32"
45+
"pestphp/pest-plugin-livewire": "*"
4546
},
4647
"autoload": {
4748
"psr-4": {

config/cachet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
| This is the model that will be used to authenticate users. This model
3434
| must be an instance of Illuminate\Foundation\Auth\User.
3535
*/
36-
'user_model' => App\Models\User::class,
36+
'user_model' => \App\Models\User::class,
3737

3838
/*
3939
|--------------------------------------------------------------------------

database/factories/IncidentUpdateFactory.php

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)