Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/2.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
devansh-webkul committed Sep 5, 2023
2 parents 0914f37 + a0ec7e6 commit 33d1af9
Show file tree
Hide file tree
Showing 2,757 changed files with 153,468 additions and 185,135 deletions.
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ APP_TIMEZONE=Asia/Kolkata
APP_LOCALE=en
APP_CURRENCY=USD

VITE_SHOP_HOST=
VITE_SHOP_PORT=
VITE_ADMIN_HOST=
VITE_ADMIN_PORT=

ASSET_URL=http://localhost

LOG_CHANNEL=stack

DB_CONNECTION=mysql
Expand Down
49 changes: 15 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ permissions:

jobs:
tests:
runs-on: ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-systems }}

strategy:
matrix:
operating-system: [ubuntu-latest]
operating-systems: [ubuntu-latest]
php-versions: ['8.1']
name: PHP ${{ matrix.php-versions }} test on ${{ matrix.operating-system }}

name: PHP ${{ matrix.php-versions }} test on ${{ matrix.operating-systems }}

services:
mysql:
image: mysql:5.7
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: bagisto
Expand All @@ -32,17 +34,14 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: curl, gd, intl, mbstring, openssl, pdo, pdo_mysql, tokenizer, zip
extensions: curl, fileinfo, gd, intl, mbstring, openssl, pdo, pdo_mysql, tokenizer, zip

- name: Composer Install
run: |
set -e
composer install --no-cache
run: composer install

- name: Set Testing Environment
run: |
cp .env.example .env.testing
set -e
sed -i "s|^\(APP_ENV=\s*\).*$|\1testing|" .env.testing
sed -i "s|^\(DB_HOST=\s*\).*$|\1127.0.0.1|" .env.testing
sed -i "s|^\(DB_PORT=\s*\).*$|\1${{ job.services.mysql.ports['3306'] }}|" .env.testing
Expand All @@ -51,34 +50,16 @@ jobs:
sed -i "s|^\(DB_PASSWORD=\s*\).*$|\1root|" .env.testing
- name: Key Generate
run: set -e && php artisan key:generate --env=testing

- name: Comlplete Testing Env File
run: |
printf "The complete `.env.testing` ... \n\n"
cat .env.testing
run: php artisan key:generate --env=testing

- name: Optimize Stuffs
run: set -e && php artisan optimize:clear --env=testing
run: php artisan optimize --env=testing

- name: Migrate Database
run: set -e && php artisan migrate --env=testing

- name: Seed Database
run: set -e && php artisan db:seed --env=testing
- name: Migrate And Seed Database
run: php artisan migrate:fresh --seed --env=testing

- name: Vendor Publish
run: set -e && php artisan bagisto:publish --force --env=testing

- name: Execute Unit Tests
run: set -e && vendor/bin/codecept run unit
run: php artisan bagisto:publish --force

- name: Execute Functional Tests
run: set -e && vendor/bin/codecept run functional

- name: Persist Test Artifacts
uses: actions/upload-artifact@v1
if: always()
with:
name: test_artifacts
path: tests/_output
- name: Running Test
run: vendor/bin/pest --colors=always
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
.env.testing
.idea
.php_cs.cache
.phpunit.result.cache
.vscode
.vagrant
*.hot
/stubs
/data
/docker-compose-collection
Expand All @@ -18,11 +20,10 @@ package-lock.json
/public/js
/public/hot
/public/storage
/public/themes
/public/vendor
/lang/vendor
/storage/*.key
/storage/dcc-data/
/vendor
yarn.lock
yarn-error.log
yarn-error.log
Loading

0 comments on commit 33d1af9

Please sign in to comment.