Skip to content

Commit

Permalink
fix: migrations on test
Browse files Browse the repository at this point in the history
  • Loading branch information
mckenziearts committed Sep 6, 2024
1 parent e13ec17 commit e499e3c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/monorepo-split.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
package_directory: 'packages/${{ matrix.package }}'
repository_organization: 'shopperlabs'
repository_name: '${{ matrix.package }}'
branch: ${{ github.ref_name }}
branch: 2.x
tag: ${{ steps.previous-tag.outputs.tag }}
user_name: 'Arthur Monney'
user_email: '[email protected]'
34 changes: 21 additions & 13 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

env:
SCREENSHOT_PATH: public/img/screenshots/${{ github.ref_name }}
DOC_REPOSITORY_NAME: laravelshopper.dev

jobs:
docs:
Expand All @@ -16,20 +17,27 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setting Git Account
run: |
git config --global user.email "[email protected]"
git config --global user.name "Arthur Monney"
- name: Cloning docs repository
run: git clone --depth=1 https://${{ secrets.ACCESS_TOKEN }}@github.com/shopperlabs/laravelshopper.dev-next.git updated-docs
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
git clone --depth=1 https://github.com/shopperlabs/laravelshopper.dev.git
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Create and Copy folders assets
run: |
mkdir -p "./updated-docs/$SCREENSHOT_PATH"
cp -R -f packages/admin/docs/content ./updated-docs/resources/docs
cp -R -f packages/admin/docs/screenshots "./updated-docs/$SCREENSHOT_PATH"
- name: Publishing assets
mkdir -p "./$DOC_REPOSITORY_NAME/$SCREENSHOT_PATH"
cp -Rf packages/admin/docs/content "./$DOC_REPOSITORY_NAME/resources/docs"
cp -Rf packages/admin/docs/screenshots "./$DOC_REPOSITORY_NAME/$SCREENSHOT_PATH"
- name: Commit and Push Changes
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
cd updated-docs
git add .
git commit -m "docs: Update docs"
git push origin main
cd $DOC_REPOSITORY_NAME
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "docs: update /resources/docs folder with latest changes"
git push origin main
else
echo "No changes to commit."
fi
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"@tailwindcss/typography": "^0.5.10",
"autoprefixer": "^10.4.2",
"esbuild": "^0.20.2",
"intl-tel-input": "^17.0.19",
"lodash": "^4.17.13",
"npm-run-all": "^4.1.5",
"popper.js": "^1.16.0",
Expand Down
11 changes: 10 additions & 1 deletion tests/src/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,22 @@
abstract class TestCase extends BaseTestCase
{
use RefreshDatabase;
use WithLaravelMigrations;
use WithWorkbench;

protected bool $seed = true;

protected string $seeder = ShopperSeeder::class;

protected function setUp(): void
{
parent::setUp();

$this->loadLaravelMigrations();

// Freeze time to avoid timestamp errors
$this->freezeTime();
}

protected function getPackageProviders($app): array
{
return [
Expand Down

0 comments on commit e499e3c

Please sign in to comment.