Skip to content

Commit

Permalink
Test build before tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Simoneu01 committed Oct 8, 2023
1 parent 0691b4c commit 3e58e5a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 29 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/laravel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ on:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
needs: laravel-tests

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
check-latest: true

- name: Install NPM dependencies
run: npm install

- name: Compile assets
run: npm run build

laravel-tests:
runs-on: ubuntu-latest

Expand All @@ -18,7 +38,7 @@ jobs:
coverage: pcov

- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
Expand Down Expand Up @@ -51,30 +71,10 @@ jobs:
path: storage/logs

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: tests
verbose: true
fail_ci_if_error: true

build:
runs-on: ubuntu-latest
needs: laravel-tests

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
check-latest: true

- name: Install NPM dependencies
run: npm install

- name: Compile assets for production
run: npm run build
7 changes: 0 additions & 7 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,4 @@
abstract class TestCase extends BaseTestCase
{
use CreatesApplication;

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

$this->withoutVite();
}
}

0 comments on commit 3e58e5a

Please sign in to comment.