Skip to content

Commit

Permalink
feat: update
Browse files Browse the repository at this point in the history
  • Loading branch information
ezralazuardy committed May 4, 2024
1 parent c808032 commit 0df7475
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 27 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,39 @@ name: Build

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.3'
- uses: actions/checkout@v3
- name: Setup Environment Variables
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Setup Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Install Composer Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Install Yarn Dependencies
run: yarn install --frozen-lockfile
- name: Build Frontend Assets
run: yarn build
- name: Generate Application Key
run: php artisan key:generate
- name: Remove Existing Application Caches
run: php artisan optimize:clear
- name: Create Database
run: mkdir -p database && touch database/database.sqlite
- name: Execute Tests (Unit and Feature tests) via PHPUnit
run: php artisan test --parallel
env:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: "8.3"
- uses: actions/checkout@v3
- name: Setup Environment Variables
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Setup Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Install Composer Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Install Yarn Dependencies
run: yarn install --frozen-lockfile
- name: Build Frontend Assets
run: yarn build
- name: Generate Application Key
run: php artisan key:generate
- name: Remove Existing Application Caches
run: php artisan optimize:clear
- name: Create Database
run: mkdir -p database && touch database/database.sqlite
- name: Execute Tests (Unit and Feature tests) via PHPUnit
run: php artisan test --parallel
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
DB_DATABASE: ":memory:"
RETIA_API_URL: ${{ secrets.RETIA_API_URL }}
RETIA_API_PORT: ${{ secrets.RETIA_API_PORT }}
RETIA_API_USERNAME: ${{ secrets.RETIA_API_USERNAME }}
Expand Down
3 changes: 2 additions & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
<env name="APP_ENV" value="testing"/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="DB_DATABASE" value="testing"/>
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
<env name="MAIL_MAILER" value="array"/>
<env name="PULSE_ENABLED" value="false"/>
<env name="QUEUE_CONNECTION" value="sync"/>
Expand Down

0 comments on commit 0df7475

Please sign in to comment.