-
-
Notifications
You must be signed in to change notification settings - Fork 223
84 lines (71 loc) · 2.18 KB
/
cypress.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
name: Cypress
on:
push:
branches:
- "**"
paths-ignore:
- "art/**"
- "README.md"
pull_request:
types: [ready_for_review, synchronize, opened]
paths-ignore:
- "art/**"
- "README.md"
jobs:
build:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: powergridtest
ports:
- 3307:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
postgres:
image: postgres:9.6
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: powergridtest
ports:
- 5433:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
strategy:
fail-fast: false
matrix:
php: [ 8.2 ]
name: PHP:${{ matrix.php }}
if: github.ref != 'refs/heads/todo-tests'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
tools: composer:v2
coverage: none
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Build App
run: |
npm install
git clone https://github.com/Power-Components/powergrid-cypress-base.git tests/cypress/app
chmod +x ./tests/cypress/mysql.sh
chmod +x ./tests/cypress/pgsql.sh
- name: MySQL
run: |
./tests/cypress/mysql.sh
cd ./tests/cypress/app && php artisan serve & sleep 5 &
cd ./tests/cypress && npx cypress run
shell: bash
- name: PostGreSQL
run: |
./tests/cypress/pgsql.sh
cd ./tests/cypress/app && php artisan serve & sleep 5 &
cd ./tests/cypress && npx cypress run
shell: bash