-
-
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
1 parent
3af926a
commit f166d67
Showing
1 changed file
with
50 additions
and
49 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 |
---|---|---|
@@ -1,67 +1,68 @@ | ||
name: tests | ||
|
||
on: | ||
pull_request: | ||
branches: [development, dev, acceptance, staging, main, master] | ||
pull_request: | ||
branches: [development, dev, acceptance, staging, main, master] | ||
|
||
jobs: | ||
skip-duplicates: | ||
continue-on-error: true # Uncomment once integration is finished | ||
runs-on: ubuntu-latest | ||
skip-duplicates: | ||
continue-on-error: true # Uncomment once integration is finished | ||
runs-on: ubuntu-latest | ||
|
||
# Map a step output to a job output | ||
outputs: | ||
should_skip: ${{ steps.skip_check.outputs.should_skip }} | ||
# Map a step output to a job output | ||
outputs: | ||
should_skip: ${{ steps.skip_check.outputs.should_skip }} | ||
|
||
steps: | ||
- id: skip_check | ||
uses: fkirc/skip-duplicate-actions@v5 | ||
with: | ||
# All of these options are optional, so you can remove them if you are happy with the defaults | ||
cancel_others: "true" | ||
concurrent_skipping: "same_content" | ||
skip_after_successful_duplicate: "true" | ||
paths_ignore: '["**/README.md", "**/docs/**"]' | ||
steps: | ||
- id: skip_check | ||
uses: fkirc/skip-duplicate-actions@v5 | ||
with: | ||
# All of these options are optional, so you can remove them if you are happy with the defaults | ||
cancel_others: "true" | ||
concurrent_skipping: "same_content" | ||
skip_after_successful_duplicate: "true" | ||
paths_ignore: '["**/README.md", "**/docs/**"]' | ||
|
||
laravel-tests: | ||
needs: skip-duplicates | ||
if: needs.skip-duplicates.outputs.should_skip != 'true' | ||
laravel-tests: | ||
needs: skip-duplicates | ||
if: needs.skip-duplicates.outputs.should_skip != 'true' | ||
|
||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "8.2" | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "8.2" | ||
extensions: pcntl | ||
|
||
- name: Cache Composer dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: /tmp/composer-cache | ||
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | ||
- name: Cache Composer dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: /tmp/composer-cache | ||
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | ||
|
||
- uses: php-actions/composer@v6 | ||
with: | ||
version: 2.x | ||
- uses: php-actions/composer@v6 | ||
with: | ||
version: 2.x | ||
|
||
- name: Copy .env | ||
run: php -r "file_exists('.env') || copy('.env.example', '.env');" | ||
- name: Copy .env | ||
run: php -r "file_exists('.env') || copy('.env.example', '.env');" | ||
|
||
- name: Generate key | ||
run: php artisan key:generate | ||
- name: Generate key | ||
run: php artisan key:generate | ||
|
||
- name: Directory Permissions | ||
run: chmod -R 777 storage bootstrap/cache | ||
- name: Directory Permissions | ||
run: chmod -R 777 storage bootstrap/cache | ||
|
||
- name: Create Database | ||
run: | | ||
mkdir -p database | ||
touch database/database.sqlite | ||
- name: Create Database | ||
run: | | ||
mkdir -p database | ||
touch database/database.sqlite | ||
- name: Execute tests | ||
env: | ||
DB_CONNECTION: sqlite | ||
DB_DATABASE: database/database.sqlite | ||
run: php artisan test --parallel | ||
- name: Execute tests | ||
env: | ||
DB_CONNECTION: sqlite | ||
DB_DATABASE: database/database.sqlite | ||
run: php artisan test --parallel |