-
Notifications
You must be signed in to change notification settings - Fork 24
43 lines (32 loc) · 936 Bytes
/
main.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
name: DevNation-CMS CI
on:
push:
branches:
- main
- feature/*
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2.12'
- name: Install dependencies
run: composer install
- name: Create .env file from .env.example
run: cp .env.example .env || echo "APP_KEY=base64:$(openssl rand -base64 32)" > .env
- name: Generate application key
run: php artisan key:generate
- name: Create SQLite database file
run: |
touch database/database.sqlite
- name: Run migrations
run: php artisan migrate --env=testing
- name: Run tests
run: php artisan test
- name: Clear cache
run: php artisan config:clear && php artisan cache:clear