-
Notifications
You must be signed in to change notification settings - Fork 742
62 lines (47 loc) · 1.47 KB
/
auth.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Authentication Tests
# on:
# push:
# branches:
# - main
# pull_request:
# branches:
# - main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: mbstring, xml, ctype, iconv, mysql
- name: Cache Composer Packages
uses: actions/cache@v2
with:
path: ~/.composer/cache
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-git
- name: Install Dependencies
run: composer install --no-progress --prefer-dist
- name: Remove current tests and symlink to DevDojo Auth
run: |
rm -rf tests
ln -s vendor/devdojo/auth/tests tests
- name: Create sqlite file
run: touch database/database.sqlite
- name: List out .env
run: cat .env
- name: Updating values in the .env
run: |
sed -i 's/DB_CONNECTION=mysql/DB_CONNECTION=sqlite/' .env
sed -i 's/^DB_DATABASE=laravel/#DB_DATABASE=laravel/' .env
- name: Run the migrations
run: php artisan migrate
- name: Run the Auth Migrations
run: php artisan migrate --path=vendor/devdojo/auth/database/migrations
- name: Install PestPHP
run: composer require pestphp/pest --dev --with-all-dependencies
- name: Run Tests
run: ./vendor/bin/pest