mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-12 12:10:41 -05:00
Initial Workflows
This commit is contained in:
parent
a13e9eb258
commit
e66465f369
23
.env.ci
Normal file
23
.env.ci
Normal file
@ -0,0 +1,23 @@
|
||||
APP_NAME="The Forge"
|
||||
APP_ENV=testing
|
||||
APP_KEY=
|
||||
APP_DEBUG=false
|
||||
APP_URL=http://forge.test
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_DEPRECATIONS_CHANNEL=null
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=localhost
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=test
|
||||
DB_USERNAME=mysql
|
||||
DB_PASSWORD=mysql
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
FILESYSTEM_DISK=local
|
||||
QUEUE_CONNECTION=sync
|
||||
CACHE_DRIVER=array
|
||||
EMAIL_DRIVER=array
|
||||
SESSION_DRIVER=array
|
40
.github/dependabot.yml
vendored
Normal file
40
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
version: 2
|
||||
updates:
|
||||
# Composer dependencies (PHP)
|
||||
- package-ecosystem: "composer"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "15:00" # 10am EST
|
||||
open-pull-requests-limit: 10
|
||||
target-branch: "develop"
|
||||
labels:
|
||||
- "dependencies"
|
||||
assignees:
|
||||
- "Refringe"
|
||||
|
||||
# GitHub Actions
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "15:00" # 10am EST
|
||||
open-pull-requests-limit: 10
|
||||
target-branch: "develop"
|
||||
labels:
|
||||
- "dependencies"
|
||||
assignees:
|
||||
- "Refringe"
|
||||
|
||||
# npm modules (JavaScript)
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "15:00" # 10am EST
|
||||
open-pull-requests-limit: 10
|
||||
target-branch: "develop"
|
||||
labels:
|
||||
- "dependencies"
|
||||
assignees:
|
||||
- "Refringe"
|
143
.github/workflows/ci.yml
vendored
Normal file
143
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,143 @@
|
||||
name: Forge CI
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
laravel-tests:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:latest
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: mysql
|
||||
MYSQL_DATABASE: test
|
||||
MYSQL_USER: mysql
|
||||
MYSQL_PASSWORD: mysql
|
||||
ports:
|
||||
- 3306:3306
|
||||
options: >-
|
||||
--health-cmd="mysqladmin ping --silent"
|
||||
--health-interval=10s
|
||||
--health-timeout=5s
|
||||
--health-retries=5
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20.x'
|
||||
|
||||
- name: Cache NPM
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-npm-cache-
|
||||
|
||||
- name: Install NPM Packages
|
||||
run: npm ci
|
||||
|
||||
- name: Build Frontend
|
||||
run: npm run build
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.3'
|
||||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
|
||||
coverage: none
|
||||
|
||||
- name: Get Composer Cache Directory
|
||||
id: composer-cache
|
||||
run: echo "composer_cache_dir=$(composer config cache-files-dir)" >> $GITHUB_ENV
|
||||
|
||||
- name: Cache Composer Dependencies
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ env.composer_cache_dir }}
|
||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-composer-
|
||||
|
||||
- name: Install Composer Dependencies
|
||||
run: composer install -n --prefer-dist
|
||||
|
||||
- name: Prepare Laravel Application
|
||||
run: |
|
||||
cp .env.ci .env
|
||||
php artisan key:generate
|
||||
|
||||
- name: Set Application Cache Directory Permissions
|
||||
run: chmod -R 777 storage bootstrap/cache
|
||||
|
||||
- name: Run Database Migrations
|
||||
env:
|
||||
DB_CONNECTION: mysql
|
||||
DB_DATABASE: test
|
||||
DB_PORT: 3306
|
||||
DB_USERNAME: mysql
|
||||
DB_PASSWORD: mysql
|
||||
run: php artisan migrate
|
||||
|
||||
- name: Execute Unit and Feature Tests
|
||||
env:
|
||||
DB_CONNECTION: mysql
|
||||
DB_DATABASE: test
|
||||
DB_PORT: 3306
|
||||
DB_USERNAME: mysql
|
||||
DB_PASSWORD: mysql
|
||||
run: vendor/bin/pest
|
||||
|
||||
- name: Upload App Logs
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: app
|
||||
path: storage/logs
|
||||
|
||||
security-check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Security Checker
|
||||
uses: symfonycorp/security-checker-action@v5
|
||||
|
||||
larastan:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.3'
|
||||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
|
||||
coverage: none
|
||||
|
||||
- name: Get Composer Cache Directory
|
||||
id: composer-cache
|
||||
run: echo "composer_cache_dir=$(composer config cache-files-dir)" >> $GITHUB_ENV
|
||||
|
||||
- name: Cache Composer Dependencies
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ env.composer_cache_dir }}
|
||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-composer-
|
||||
|
||||
- name: Install Composer Dependencies
|
||||
run: composer install -n --no-dev --prefer-dist
|
||||
|
||||
- name: Execute Code Static Analysis with Larastan
|
||||
run: |
|
||||
composer require --dev nunomaduro/larastan
|
||||
vendor/bin/phpstan analyse -c ./phpstan.neon --no-progress
|
Loading…
x
Reference in New Issue
Block a user