-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.18 KB
/
test.yaml
File metadata and controls
41 lines (39 loc) · 1.18 KB
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
name: RUn Test
on:
push:
branches: [ main]
pull_request:
branches: [ main]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.2'
- uses: actions/checkout@v3
- uses: actions/checkout@v3
- uses: shogo82148/actions-setup-redis@v1
with:
redis-version: '6.x'
- run: redis-cli ping
- uses: mirromutth/mysql-action@v1.1
with:
character set server: 'utf8'
collation server: 'utf8_general_ci'
mysql version: '8.0'
mysql database: 'test'
mysql root password: 'rahul@123'
- uses: actions/checkout@v3
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.testing', '.env');"
- name: Install Dependencies
run: composer update
- name: Update Distro
run: sudo apt-get update -y
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Execute tests (Unit and Feature tests) via PHPUnit
run: vendor/bin/phpunit