-
Notifications
You must be signed in to change notification settings - Fork 52
73 lines (59 loc) · 1.79 KB
/
integration-testing.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
name: Integration testing
# Controls when the action will run.
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
portal:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_USER: homestead
MYSQL_PASSWORD: secret
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: homestead
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# cypress setup
- name: Setup PHP v8.2
uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
- name: Setup cypress-testing
uses: actions/checkout@v2
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
run: composer install
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Run migrations
run: |
php artisan migrate
- name: Run seeders
run: |
php artisan db:seed
php artisan module:seed
- name: Compile assets
run: |
export NODE_OPTIONS=--openssl-legacy-provider
npm install
npm run dev
- name: Run local server
run: |
php artisan serve &
- name: Run cypress
run: |
cp cypress.json.example cypress.json
npm run cypress-record ${{ secrets.CYPRESS_DASHBOARD_KEY }}