Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ APP_KEY=
APP_DEBUG=false
APP_URL=http://localhost

FORCE_HTTPS=false

CONTENT_WIDTH=7xl

DASHBOARD_POLLING=60
NOTIFICATION_POLLING=60
RESULTS_POLLING=false

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug
Expand Down Expand Up @@ -39,10 +31,4 @@ MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="Speedtest Tracker"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

TELEGRAM_BOT_TOKEN=null
34 changes: 34 additions & 0 deletions .env.testing
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
APP_NAME="Speedtest Tracker"
APP_ENV=local
APP_KEY=base64:Tx3xYzxoL/5LmKHYr9QXlbnhTDVE1GK5T7tzxpovHaY=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=testing
DB_USERNAME=root
DB_PASSWORD=

BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database
SESSION_DRIVER=database
SESSION_LIFETIME=1440

MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="Speedtest Tracker"

TELEGRAM_BOT_TOKEN=null
18 changes: 11 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,24 @@ updates:
directory: "/"
schedule:
interval: "weekly"
day: "thursday"
labels:
- "😑 dependencies"
- "🐋 docker"
reviewers:
- "alexjustesen"
commit-message:
prefix: "docker"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "thursday"
labels:
- "😑 dependencies"
- "🧑‍💻 github actions"
# - package-ecosystem: "composer"
# directory: "/"
# schedule:
# interval: "weekly"
# labels:
# - "😑 dependencies"
# - "🐘 php"
reviewers:
- "alexjustesen"
commit-message:
prefix: "gh actions"
16 changes: 0 additions & 16 deletions .github/workflows/lint.yml

This file was deleted.

58 changes: 38 additions & 20 deletions .github/workflows/test.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1,88 @@
name: Test
# .github/workflows/tests.yml
name: Tests

on:
push:
branches:
- '!main'
- '!release-**'
pull_request:
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: "duster"
uses: tighten/duster-action@v2
with:
args: lint --using=pint

test:
strategy:
matrix:
operating-system:
- ubuntu-latest
php-version:
- '8.2'
name: php ${{ matrix.php-version }} on ${{ matrix.operating-system }}
needs: [lint] # needs lint job to pass first

runs-on: ubuntu-22.04

services:
mysql:
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: test
MYSQL_DATABASE: testing
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
runs-on: ${{ matrix.operating-system }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: bcmath, ctype, fileinfo, json, mbstring, openssl, pdo, tokenizer, xml
coverage: xdebug
php-version: '8.2'

- name: Prepare the environment
run: cp .env.example .env
run: cp .env.testing .env

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Setup composer cache
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install composer dependencies
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Install application
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Install npm dependencies and build assets
run: npm ci && npm run build

- name: Directory permissions
run: chmod -R 777 storage bootstrap/cache

- name: Test application install
run: php artisan app:install --force
env:
DB_CONNECTION: mysql
DB_HOST: 127.0.0.1
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
DB_DATABASE: testing
DB_USERNAME: root
DB_DATABASE: test
DB_PASSWORD: null

- name: Run tests
run: php artisan test
env:
DB_CONNECTION: mysql
DB_HOST: 127.0.0.1
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
DB_DATABASE: testing
DB_USERNAME: root
DB_DATABASE: test
DB_PASSWORD: null
22 changes: 11 additions & 11 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"exclude": [
"config"
],
"notName": [
"server.php"
]
"rules": {
"fully_qualified_strict_types": false
}
}