Skip to content

Commit c396c68

Browse files
Merge pull request #15 from laracasts/run-tests
wip
2 parents 864cd8d + fc8c27e commit c396c68

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

.github/workflows/tests.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Tests
2+
3+
on:
4+
pull_request
5+
6+
jobs:
7+
run-tests:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout Code
12+
uses: actions/[email protected]
13+
14+
- name: Setup PHP and Composer
15+
uses: shivammathur/setup-php@v2
16+
with:
17+
php-version: '8.3'
18+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, redis, igbinary, msgpack, lzf, zstd, lz4, memcached, gmp, :php-psr
19+
tools: composer:v2
20+
21+
- name: Install Dependencies
22+
run: composer install -q --no-interaction
23+
24+
- name: Prep Application
25+
run: |
26+
cp .env.example .env
27+
php artisan key:generate
28+
29+
- name: Run Tests
30+
env:
31+
DB_CONNECTION: sqlite
32+
DB_DATABASE: ":memory:"
33+
run: php artisan test --compact

tests/TestCase.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,10 @@
66

77
abstract class TestCase extends BaseTestCase
88
{
9-
//
9+
protected function setUp(): void
10+
{
11+
parent::setUp();
12+
13+
$this->withoutVite();
14+
}
1015
}

0 commit comments

Comments
 (0)