-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# These are supported funding model platforms | ||
|
||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] | ||
patreon: ramakant | ||
open_collective: # Replace with a single Open Collective username | ||
ko_fi: # Replace with a single Ko-fi username | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
otechie: # Replace with a single Otechie username | ||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
pull_request: | ||
types: | ||
- synchronize | ||
- opened | ||
- edited | ||
- reopened | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [7.4, 8.0] | ||
laravel: ['~8.0'] | ||
|
||
name: 'PHP ${{ matrix.php }} / ${{ matrix.laravel }}' | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
|
||
# Configure PHP | ||
- name: Select PHP version | ||
uses: shivammathur/setup-php@master | ||
with: | ||
php-version: '${{ matrix.php }}' | ||
extensions: mbstring, pdo_sqlite, fileinfo, gd | ||
coverage: none | ||
|
||
# Configure NPM | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14.x' | ||
|
||
# Install PHP dependencies | ||
- name: Install Composer dependencies | ||
run: composer require "illuminate/support:${{ matrix.laravel }}" | ||
|
||
# Install legacy factories for Laravel 8 | ||
- name: Install legacy factories for Laravel | ||
if: ${{ matrix.laravel == '8.*' }} | ||
run: composer require laravel/legacy-factories | ||
|
||
# Display installed laravel version | ||
- name: Show laravel version | ||
run: composer show laravel/framework | ||
|
||
# Install NPM dependencies | ||
- name: Install Dependencies | ||
run: npm install | ||
|
||
# Build static assets | ||
- name: Compile Assets | ||
run: npm run prod | ||
- name: Copy .env | ||
run: php -r "file_exists('.env') || copy('.env.example', '.env');" | ||
- name: Install Dependencies | ||
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | ||
- name: Generate key | ||
run: php artisan key:generate | ||
- name: Directory Permissions | ||
run: chmod -R 777 storage bootstrap/cache | ||
- name: Create Database | ||
run: | | ||
mkdir -p database | ||
touch database/database.sqlite | ||
- name: Execute tests (Unit and Feature tests) via PHPUnit | ||
env: | ||
DB_CONNECTION: sqlite | ||
DB_DATABASE: database/database.sqlite | ||
run: vendor/bin/phpunit | ||
|
||
# # Run phpunit tests | ||
# - name: Run tests | ||
# run: ./vendor/bin/phpunit |