-
Notifications
You must be signed in to change notification settings - Fork 5
/
build-older.yml
108 lines (103 loc) · 3.64 KB
/
build-older.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Laravel
on:
push:
branches: [development]
jobs:
laravel-tests:
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: "8.0"
- uses: actions/checkout@v1
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Create Database
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: |
mkdir -p database
touch database/database.sqlite
php artisan migrate
- name: Bring the server up
run: ./vendor/bin/sail up
- name: Execute tests (Unit and Feature tests) via PHPUnit
run: ./vendor/bin/phpunit
# app-tests:
# runs-on: ubuntu-latest
# services:
# mysql:
# image: mysql:5.7
# env:
# MYSQL_ALLOW_EMPTY_PASSWORD: no
# MYSQL_DATABASE: nmrxiv
# MYSQL_USERNAME: sail
# MYSQL_PASSWORD: password
# ports:
# - 3306
# options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
# steps:
# - uses: actions/checkout@v1
# - name: Copy .env
# run: php -r "file_exists('.env') || copy('.env.example', '.env');"
# - name: Install Composer Dependencies
# run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
# - name: Install NPM Dependencies
# run: npm install
# - name: Generate key
# run: php artisan key:generate
# - name: Execute tests (Unit and Feature tests) using PHPUnit
# env:
# DB_PORT: ${{ job.services.mysql.ports[3306] }}
# run: |
# ./vendor/bin/sail up
# ./vendor/bin/phpunit
# - name: Execute tests (Unit and Feature tests) using JEST
# run: node_modules/.bin/jest
# dusk-php:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Prepare The Environment
# run: cp .env.example .env
# - name: Install Composer Dependencies
# run: composer install --no-progress --prefer-dist --optimize-autoloader
# - name: Generate Application Key
# run: php artisan key:generate
# - name: Create Database
# env:
# DB_CONNECTION: sqlite
# DB_DATABASE: database/database.sqlite
# run: |
# mkdir -p database
# touch database/database.sqlite
# php artisan migrate
# # - name: Upgrade Chrome Driver
# # run: php artisan dusk:chrome-driver `/opt/google/chrome/chrome --version | cut -d " " -f3 | cut -d "." -f1`
# - name: Start Chrome Driver
# run: ./vendor/laravel/dusk/bin/chromedriver-linux &
# - name: Run Laravel Server
# run: php artisan serve --no-reload &
# - name: Run Dusk Tests
# env:
# APP_URL: "http://127.0.0.1:8000"
# run: php artisan dusk
# - name: Upload Screenshots
# if: failure()
# uses: actions/upload-artifact@v2
# with:
# name: screenshots
# path: tests/Browser/screenshots
# - name: Upload Console Logs
# if: failure()
# uses: actions/upload-artifact@v2
# with:
# name: console
# path: tests/Browser/console