Skip to content

Commit e48a404

Browse files
Copilotkobenguyent
andcommitted
Changes before error encountered
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
1 parent 25f981b commit e48a404

File tree

6 files changed

+1631
-0
lines changed

6 files changed

+1631
-0
lines changed

.github/workflows/cypress.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Cypress Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- 3.x
7+
pull_request:
8+
branches:
9+
- '**'
10+
11+
env:
12+
CI: true
13+
# Force terminal colors. @see https://www.npmjs.com/package/colors
14+
FORCE_COLOR: 1
15+
16+
jobs:
17+
build:
18+
strategy:
19+
matrix:
20+
os: [ubuntu-22.04]
21+
php-version: ['8.1']
22+
node-version: [22.x]
23+
fail-fast: false
24+
25+
runs-on: ${{ matrix.os }}
26+
27+
steps:
28+
- uses: actions/checkout@v5
29+
- name: Use Node.js ${{ matrix.node-version }}
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: ${{ matrix.node-version }}
33+
- uses: shivammathur/setup-php@v2
34+
with:
35+
php-version: ${{ matrix.php-version }}
36+
- name: npm install
37+
run: |
38+
npm i --force
39+
npm install cypress --save-dev
40+
env:
41+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
42+
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
43+
- name: start a server
44+
run: |
45+
if [ "$RUNNER_OS" == "Windows" ]; then
46+
start /B php -S 127.0.0.1:8000 -t test/data/app
47+
else
48+
php -S 127.0.0.1:8000 -t test/data/app &
49+
fi
50+
sleep 3
51+
shell: bash
52+
- name: run unit tests
53+
run: ./node_modules/.bin/mocha test/helper/Cypress_test.js --timeout 10000
54+
- name: run acceptance tests
55+
run: |
56+
if [ -f test/acceptance/codecept.Cypress.js ]; then
57+
./bin/codecept.js run --config test/acceptance/codecept.Cypress.js --steps
58+
else
59+
echo "Cypress acceptance tests not yet implemented"
60+
fi

0 commit comments

Comments
 (0)