-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split backend tests & client build #259
Conversation
WalkthroughThe GitHub Actions workflow for a Laravel project has been updated. The Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ? TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (1)
- .github/workflows/laravel.yml (3 hunks)
Additional comments: 2
.github/workflows/laravel.yml (2)
9-12: The renaming of the
tests
job tobackend_tests
is clear and aligns with the PR objectives to distinguish backend tests from other jobs.175-176: The update to the
production-deploy
job's dependencies to include bothbackend_tests
andbuild_client
is correct and aligns with the PR objectives to ensure both jobs pass before deployment.
build_client: | ||
runs-on: ubuntu-latest | ||
|
||
name: Build front-end client | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Get Composer cache directory | ||
id: composer-cache | ||
run: | | ||
echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, mbstring, pdo, sqlite, pdo_sqlite | ||
tools: composer:v2 | ||
coverage: none | ||
|
||
- name: Prepare the environment | ||
run: cp .env.example .env | ||
|
||
- name: Install composer dependencies | ||
run: composer install --prefer-dist --no-interaction --no-progress --ignore-platform-reqs --optimize-autoloader | ||
|
||
- name: Directory permissions | ||
run: chmod -R 777 storage bootstrap/cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build_client
job includes steps for setting up PHP and installing composer dependencies, which may not be necessary for building a front-end client. Verify if these steps are required for the client build process or if they can be removed to optimize the workflow.
To speed things up a bit, build client in another test.
Summary by CodeRabbit
Refactor
backend_tests
for clarity.New Features
build_client
to handle building the front-end client.Chores
production-deploy
job to include the newbuild_client
job as a dependency, ensuring both backend tests and front-end build are completed before deployment.